Glossary Term
Number() constructor
The Number() constructor creates Number objects. When called as a function, it returns primitive values of type Number.
Return value: When Number() is called as a function (without new), it returns value coerced to a number primitive. Specially, BigInts values are converted to numbers instead of throwing. If value is absent, it becomes 0.
Return value: When Number() is called as a constructor (with new), it uses the coercion process above and returns a wrapping Number object, which is not a primitive.
Return value: Warning: You should rarely find yourself using Number as a constructor.
Parameters: value The numeric value of the object being created.
Syntax example: new Number(value)
Term Connections
Explore related terms connected by shared tags, shared categories, and relationship phrases. This map loads only when it comes into view.
Loading term connections…
