⊗jsPmBsIy 38 of 504 menu

Infinity, -Infinity values in JavaScript

Such values as Infinity and -Infinity are obtained if some number is divided by zero. JavaScript does not throw an error, in such a case, as in other programming languages, but returns these values:

alert( 1 / 0); // shows Infinity alert(-1 / 0); // shows -Infinity

Divide the number 10 by 0. Display the result on the screen.

Divide the number -10 by 0. Display the result on the screen.

English
AfrikaansAzərbaycanБългарскиবাংলাБеларускаяČeštinaDanskDeutschΕλληνικάEspañolEestiSuomiFrançaisहिन्दीMagyarՀայերենIndonesiaItaliano日本語ქართულიҚазақ한국어КыргызчаLietuviųLatviešuМакедонскиMelayuမြန်မာNederlandsNorskPolskiPortuguêsRomânăРусскийසිංහලSlovenčinaSlovenščinaShqipСрпскиSrpskiSvenskaKiswahiliТоҷикӣไทยTürkmenTürkçeЎзбекOʻzbekTiếng Việt
We use cookies for website operation, analytics, and personalization. Data processing is carried out in accordance with the Privacy Policy.
accept all customize decline