About 28,400 results
Open links in new tab
  1. javascript - Using the indexOf method on an array of objects

    Using the indexOf method on an array of objects Asked 13 years, 10 months ago Modified 1 month ago Viewed 926k times

  2. JavaScript: String.indexOf(...) allowing regular-expressions?

    In javascript, is there an equivalent of String.indexOf (...) that takes a regular expression instead of a string for the first parameter, while still allowing a second parameter ? I need to do some...

  3. JavaScript indexOf method with multiple values - Stack Overflow

    JavaScript indexOf method with multiple values Asked 9 years, 5 months ago Modified 3 years, 9 months ago Viewed 67k times

  4. Difference Between indexOf and findIndex function of array

    Jan 3, 2017 · Furthermore, indexOf () compares searchElement to elements of the Array using strict equality (the same method used by the === or triple-equals operator).

  5. javascript - Why does IndexOf return -1? - Stack Overflow

    Dec 21, 2011 · I am learning Javascript and don't understand why the indexOf below returns -1: var string = "The quick brown fox jumps over the lazy dog"; console.log (string.indexOf("good"));

  6. javascript - What is the difference between indexOf () and search ...

    Dec 9, 2008 · If your situation requires the use of a regular expression, use the search() method, otherwise; the indexOf() method is more performant.

  7. JavaScript indexOf to ignore Case - Stack Overflow

    I am trying to find if an image has in its source name noPic which can be in upper or lower case. var noPic = largeSrc.indexOf("nopic"); Should I write : var noPic = …

  8. javascript - Contains case insensitive - Stack Overflow

    Oct 2, 2012 · In the first alert (), JavaScript returned "-1" - in other words, indexOf () did not find a match: this is simply because "JavaScript" is in lowercase in the first string, and properly …

  9. Writing indexOf function in JavaScript - Stack Overflow

    I am new to JavaScript. I have created a indexof function in but it is not giving the correct output: Question is: /* Implement a function called indexOf that accepts two parameters: a string and a …

  10. javascript - Using indexOf method to find value in a 2D array

    Jun 18, 2012 · This little piece of code will ensure you can use the indexOf method to find where a given value is in a one-dimensional array. With your 2-dimensional array, each element in the …