Q:

javascript enumerators

const foobar = ['A', 'B', 'C'];

for (const [index, element] of foobar.entries()) {
  console.log(index, element);
}
0
array.every(elm,index,array) // Did all elements satisfy the callback?
array.find(elm,index,array) // Find the first element that satisfies the callback
array.findIndex(elm,index,array) // Find the first element that satisfies the callback's index
array.map(elm,index,array) // Transform every element and create a new array
array.reduce(accumulator,elm,index,array) // Reduce every element into a new value
array.some(elm,index,array) // Did any element satisfy the callback? 
0

New to Communities?

Join the community