Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

array -1 javascript

//The index of any item that does not exist in an array is -1

//example:
a = ["help","I'm","a","sentient","array"];
a.indexOf("Icecream");//this returns -1
 
PREVIOUS NEXT
Tagged: #array #javascript
ADD COMMENT
Topic
Name
1+1 =