Posts by Lorrayne Carvalho • 21 points
1 post
-
1
votes2
answers78
viewsQ: Understanding the content of array elements
const funcs = []; for (let i = 0; i < 10; i++){ funcs.push(function(){ console.log(i); }); } funcs[2](); funcs[8](); I would like to understand why the result, funcs[2]() and funcs[8](), were 2…