A

Admin • 833K Points
Coach

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);
  • (A) 70
  • (B) 75
  • (C) 482
  • (D) Error
  • Correct Answer - Option(C)
  • Views: 37
  • Filed under category JavaScript
  • Hashtags:

No solution found for this question.
Add Solution and get +2 points.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.