Numbers in JavaScript: Handling and Operations

Rumman Ansari   Software Engineer   2024-07-09 09:48:23   5476  Share
Subject Syllabus DetailsSubject Details
☰ TContent
☰Fullscreen

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.