Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

find index in array javascript

// find index of array in javascript
const number = [1,6,2,8,1,0,4,2,7,5,4,1];
const index = number.findIndex(item => item === 8);
console.log(index)
Source by developer.mozilla.org #
 
PREVIOUS NEXT
Tagged: #find #index #array #javascript
ADD COMMENT
Topic
Name
5+1 =