Prev Demo
JavaScript
>
Check Finite, Legal Number
Next Demo
Write code here
J
|
B
|
A
<!DOCTYPE html> <html> <head> <title>Demo</title> </head> <body> <p>Click the below button to determine wheteher a number is legal, Finite number.</p> <input type="button" onclick="mySearch()" value="Check"> <p id="myId"></p> <script> function mySearch() { var P = isFinite(258) + "</br>"; var Q = isFinite(25.8) + "</br>"; var R = isFinite(2 * 5 * 8) + "</br>"; var S = isFinite("258") + "</br>"; var T = isFinite("Sheo Narayan") + "</br>"; //* This is Infinite *// var U = isFinite(0) + "</br>"; var V = isFinite("09-Nov-2015"); //* This is Infinite *// var A = P + Q + R + S + T + U + V; document.getElementById("myId").innerHTML = A; } </script> </body> </html>
Note: We DO NOT save your trial code in our database.
Output