Answers for "get the location of an item in an array"

0

get the location of an item in an array

console.log(scores.indexOf(10)); // 0
console.log(scores.indexOf(30)); // 2
console.log(scores.indexOf(50)); // -1
console.log(scores.indexOf(20)); // 1
Posted by: Guest on August-06-2020

Code answers related to "get the location of an item in an array"

Code answers related to "Javascript"

Browse Popular Code Answers by Language