Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

filter array and get index of num

function getIndexToIns(arr, num) {
  return arr.filter(val => num > val).length;
}
Source by forum.freecodecamp.org #
 
PREVIOUS NEXT
Tagged: #filter #array #index #num
ADD COMMENT
Topic
Name
1+9 =