What is the output of the following JavaScript code? | Question 8

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

<script>
	let str = "IncludeHelp";
	document.getElementById("test").innerHTML = str.length;
</script>
  1. 11
  2. 12
  3. ValueError
  4. SyntaxError

Answer: A) 11

Explanation:

The output of the above statement will be the length of the string. That is 11.

Comments and Discussions!

Load comments ↻






Copyright © 2024 www.includehelp.com. All rights reserved.