What will be the output of the following JavaScript code?
<p id=”demo”></p>
<script>
function myFunction()
{
var res = “”;
res = res + Number.isFinite(5-2) ;
document.getElementById(“demo”).innerHTML = res;
}
</script>
a) 3
b) true
c) false
d) error
Answer: b
Explanation: The Number.isFinite() method determines whether a value is a finite number. This method returns true if the value is of the type Number, and equates to a finite number. Otherwise, it returns false.
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