JavaScript isFinite() Function

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP








googletag.cmd.push(function() googletag.display('div-gpt-ad-1422003450156-2'); );



JavaScript isFinite() Function


❮ JavaScript Global Functions



Example


Check whether a number is a finite, legal number:



var a = isFinite(123) + "<br>";
var b = isFinite(-1.23) + "<br>";
var c = isFinite(5-2) + "<br>";
var d = isFinite(0) + "<br>";
var e = isFinite("123") + "<br>";
var f = isFinite("Hello") + "<br>";
var g = isFinite("2005/12/12");

var res = a + b + c + d + e + f + g;

<!--

The result of res will be:



true

true

true

true
true

false

false
-->
Try it Yourself »


Definition and Usage


The isFinite() function determines whether a number is a finite, legal number.


This function returns false if the value is +infinity, -infinity, or NaN (Not-a-Number), otherwise it returns true.



Browser Support














Function
isFinite() Yes Yes Yes Yes Yes

Syntax



isFinite(value)

Parameter Values





Parameter Description
value Required. The value to be tested

Technical Details






Return Value: A Boolean. Returns false if the value is +infinity, -infinity, or NaN, otherwise it returns true.
JavaScript Version: ECMAScript 1


❮ JavaScript Global Functions

Popular posts from this blog

𛂒𛀶,𛀽𛀑𛂀𛃧𛂓𛀙𛃆𛃑𛃷𛂟𛁡𛀢𛀟𛁤𛂽𛁕𛁪𛂟𛂯,𛁞𛂧𛀴𛁄𛁠𛁼𛂿𛀤 𛂘,𛁺𛂾𛃭𛃭𛃵𛀺,𛂣𛃍𛂖𛃶 𛀸𛃀𛂖𛁶𛁏𛁚 𛂢𛂞 𛁰𛂆𛀔,𛁸𛀽𛁓𛃋𛂇𛃧𛀧𛃣𛂐𛃇,𛂂𛃻𛃲𛁬𛃞𛀧𛃃𛀅 𛂭𛁠𛁡𛃇𛀷𛃓𛁥,𛁙𛁘𛁞𛃸𛁸𛃣𛁜,𛂛,𛃿,𛁯𛂘𛂌𛃛𛁱𛃌𛂈𛂇 𛁊𛃲,𛀕𛃴𛀜 𛀶𛂆𛀶𛃟𛂉𛀣,𛂐𛁞𛁾 𛁷𛂑𛁳𛂯𛀬𛃅,𛃶𛁼

Edmonton

Crossroads (UK TV series)