Question #26

Author: admin
tags: JavaScript  
let arr = [1, 2, 3];

arr.value = 4;

let sum = 0;

arr.forEach((value)  => { sum += value; } );

console.log(sum); // ??
What will the console output be?
0
4
6
10
12
16
'64'
NaN
The console will not output anything, there is a mistake in the code.
An array is an object, so you can add new properties to it.
Array iteration methods work only with object properties with "index" names.
Rate the difficulty of the question:
easyhard