javascript

Number Object


 

The Number object is a wrapper object that allows you to work with numeric values

 

Syntax:
 

var val = new Number(number);

 

Example:

let variable = new Number(23);

 

Note: We created numbr object using Number() constructor. If number is not passed to constructor then it returns NaN