Register Now

Login

Lost Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

What will be the output of the following JavaScript code?
<p id=”demo”></p>
<script>
var x = 123e5;
document.getElementById(“demo”).innerHTML = x ;
</script>

What will be the output of the following JavaScript code?
<p id=”demo”></p>
<script>
var x = 123e5;
document.getElementById(“demo”).innerHTML = x ;
</script>
a) 0.0123
b) 12300
c) error
d) undefined

Answer: b
Explanation: Extra large or extra small numbers can be written with scientific (exponential) notation. The number followed by e tells about the number of digits in the number.

Join The Discussion