πŸ“Š JavaScript
Q. What will be the output of the following JavaScript code?

Code:
<script>
	var values = [10, 20, 30, 40];
	
	var result = values.reduceRight(function(x,y){
		return (x + y);
	});
	
	document.write("Result: " + result);
</script>
  • (A) Result: 40
  • (B) Result: 70
  • (C) Result: 90
  • (D) Result: 100
πŸ’¬ Discuss
βœ… Correct Answer: (D) Result: 100

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
190
Total Visits
πŸ“½οΈ
4 y ago
Published
πŸŽ–οΈ
Ram Sharma
Publisher
πŸ“ˆ
81%
Success Rate