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>
function myFunction()
{
var res = “”;
res = res + Number.isInteger(‘123’);
document.getElementById(“demo”).innerHTML = res;
}</script>

What will be the output of the following JavaScript code?
<p id=”demo”></p>
<script>
function myFunction()
{
var res = “”;
res = res + Number.isInteger(‘123’);
document.getElementById(“demo”).innerHTML = res;
}
</script>
a) true
b) false
c) error
d) Undefined

Answer: b
Explanation: The Number.isInteger() method determines whether a value an integer. This method returns true if the value is of the type Number.

Join The Discussion