Q. Which one of the following options is the correct output for the given code of java script?
Code:
var sum=0;
vararr=[101,150,201,30];
arr.forEach(functionmyFunction(element)
{
sumsum=sum+element;
});
document.writeln(sum);
β
Correct Answer: (C)
482