Javascript Numbers

Rumman Ansari   Software Engineer   2023-03-26   5485 Share
☰ Table of Contents

Table of Content:


JavaScript has only one type of numbers.

Numbers can be written with, or without decimals:


var a = 14.00;     // Written with decimals
var b = 14;        // Written without decimals

 

Extra large or extra small numbers can be written with scientific (exponential) notation:


var y = 163e6;      
var z = 163e-6;      

You will learn more about numbers later in this tutorial.