Number objects in JavaScript Assignment Help

Number objects in JavaScript

In javascript number represents integer or floating point numbers. (eg 10 or 5.10 etc.,) The numbers can be directly assigned to variables.

For example,

var x=10;

var area=55.19;

10 and 55.19 are primitive numbers. In java script these primitive numbers can be constructed as Number objects using Number( ) constructor.

Syntax to create number objects”

var variable_name (or) object_name=new Number(value);


var n=new Number(100);

Now the primitive number ‘100’ treated as Number object.

17.1 Properties of Number objects

Number objects in JavaScript Assignment Help Through Online Tutoring and Guided Sessions at MyAssignmentHelp

Number object has associated properties with it. The properties indicate the minimum acceptable number, maximum number, minimum infinity value and maximum infinity value in java script.

The example program describes the above

number objects img1

17.2 Methods of Number object

Various operations can be performed on Number objects through Methods. Such methods are

number objects img2


number objects img3