Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

js FindIndex

const array1 = [5, 12, 50, 130, 44];

const isLarger = (element) => element > 45 ;

const found = array1.findIndex(isLarger);

console.log(found);
//output = 2
Source by developer.mozilla.org #
 
PREVIOUS NEXT
Tagged: #js #FindIndex
ADD COMMENT
Topic
Name
3+5 =