Answers for "javascipt array index cvalye for"

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
0

array index javascript

let fruits = ['Apple', 'Banana']
let first = fruits[0]
// Apple

let last = fruits[fruits.length - 1]
// Banana
Posted by: Guest on January-16-2022

Code answers related to "Javascript"

Browse Popular Code Answers by Language