isFinite-1

 

JavaScript isFinite number is used to tell whether the number is finite number. See the code snippet:

 
 
 
<!DOCTYPE html> <html> <head> <title>Welcome to LearnKode - A code learning platform</title> </head> <body> <p>Click the button to check whether a number is a finite number.</p> <button onclick="isFiniteNumber()">Click it</button> <p id="sample"></p> <script> function isFiniteNumber() { var a = isFinite(4) + "<br>"; var b = isFinite(-4) + "<br>"; var c = isFinite(4-2) + "<br>"; var d = isFinite(0) + "<br>"; var e = isFinite("145") + "<br>"; var f = isFinite("LearnKode") + "<br>"; var result = a + b + c + d + e + f ; document.getElementById("sample").innerHTML = result; } </script> </body> </html>
Output