1.

What Is Javascript Number Object?

Answer»

The Number object represents numerical date, either integers or floating-point numbers. In GENERAL, you do not need to worry about Number objects because the BROWSER automatically converts number literals to instances of the number class.

Syntax: The syntax for creating a number object is as follows:

var VAL = new Number(number);

In the place of number, if you provide any non-number argument, then the argument cannot be CONVERTED into a number, it RETURNS NaN (Not-a-Number).

The Number object represents numerical date, either integers or floating-point numbers. In general, you do not need to worry about Number objects because the browser automatically converts number literals to instances of the number class.

Syntax: The syntax for creating a number object is as follows:

var val = new Number(number);

In the place of number, if you provide any non-number argument, then the argument cannot be converted into a number, it returns NaN (Not-a-Number).



Discussion

No Comment Found