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.
Related Posts
Which one of the following is not a secondary storage?
The surface area of a tape is ________ the surface area of a disk.
Which of the following is the oldest database model?
The replacement of a bad block generally is not totally automatic because
Which of the following are the process of selecting the data storage and data access characteristics of the database?
A magneto-optic disk is :
During recovery from a failure
Join The Discussion