Answers for "for element index of array javascript"

5

js for of array with index

for (const [index, value] of [1, 2, 3, 4, 5].entries()) {
  console.log(index, value);
}
Posted by: Guest on June-18-2021
8

js get index of item in array

array.indexOf("item");
Posted by: Guest on May-13-2020

Code answers related to "for element index of array javascript"

Code answers related to "Javascript"

Browse Popular Code Answers by Language