What is Number object in JavaScript?

1 Answer(s)

He 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 −

Creating a number object −

var val = new Number(number);

If the argument cannot be converted into a number, it returns NaN (Not-a-Number).

Supporter Answered on August 15, 2019.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.