Global isFinite()
fonksiyonu girilen değerin sonlu sayı olup olmadığını kararlaştırır. Gerekliyse, parametre ilk önce sayıya çevrilir.
Söz Dizimi
isFinite(testDegeri)
Parametreler
testDegeri
- Sonluluğu test edilecek sayı.
Açıklama
isFinite
en üst seviye fonksiyondur ve herhangi bir nesne ile ilişkilendirilemez.
Bu fonksiyonu bir sayının sonlu olup olmadığını kararlaştırmak için kullanabilirsiniz. isFinite
fonksiyonu argümanı olan sayıyı sorgular. Eğer argümanın değeri NaN
, pozitif sonsuz veya negatif sonsuz ise, metod false döndürür; değilse, true döndürür.
Örnekler
isFinite(SonsuzSayı); // false
isFinite(NaN); // false
isFinite(-SonsuzSayı); // false
isFinite(0); // true
isFinite(2e64); // true
isFinite(null); // true
isFinite("0"); // true, daha güçlü bir ifade olan Number.isFinite("0")
// ile kullanılsaydı false olacaktı.
Tanımlamalar
Tanım | Durum | Açıklama |
---|---|---|
ECMAScript 3rd Edition (ECMA-262) | Standard | Initial definition. |
ECMAScript 5.1 (ECMA-262) The definition of 'isFinite' in that specification. |
Standard | |
ECMAScript 2015 (6th Edition, ECMA-262) The definition of 'isFinite' in that specification. |
Standard | |
ECMAScript Latest Draft (ECMA-262) The definition of 'isFinite' in that specification. |
Draft |
Tarayıcı Uyumluluğu
We're converting our compatibility data into a machine-readable JSON format.
This compatibility table still uses the old format,
because we haven't yet converted the data it contains.
Find out how you can help!
Özellik | Chrome | Firefox (Gecko) | Internet Explorer | Opera | Safari |
---|---|---|---|---|---|
Temel Destek | (Yes) | (Yes) | (Yes) | (Yes) | (Yes) |
Özellik | Android | Android için Chrome | Firefox Mobile (Gecko) | IE Mobile | Opera Mobile | Safari Mobile |
---|---|---|---|---|---|---|
Temel Destek | (Yes) | (Yes) | (Yes) | (Yes) | (Yes) | (Yes) |