Object.prototype.valueOf

Returns the primitive value of the specified object.

Syntax

valueOf()

Return value

The primitive value of the specified object.

Examples

{}.valueOf()
{}
Number(42).valueOf()
42