Home | Mailing List | Blog | Tutorial Videos

Array Method Callbacks

What gets logged in the following code?

let i = 0;

const arr = new Array(5);
arr.forEach(() => i++);

console.log(i);

Select one: