Account
Categories

Number


Definition:

If you use the number datatype in your program, then it stores numeric values in a variable.

It can store whole numbers and decimal numbers.

Syntax:

let variableName = 25;

Example:

let age = 25;
let price = 99.50;

Here, 25 and 99.50 are number values.

Note:

Numbers are closed without quotation marks.

If a number is closed inside quotation marks, it is a string, not a number.

Output: