Q. What will be the output of the following JavaScript code?

Code:
<script>
	function addition(a, b) {
		return a+b;
	}
	document.getElementById("test").innerHTML = addition;
</script>
  • (A) SyntaxError
  • (B) ValueError
  • (C) 0
  • (D) function addition(a, b) { return a+b; }
πŸ’¬ Discuss
βœ… Correct Answer: (D) function addition(a, b) { return a+b; }

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

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