Easy Tutorial
❮ Event Onended Prop Canvas Shadowblur ❯

JavaScript valueOf() Method


Definition and Usage

The valueOf() method returns the primitive value of a String object.

Note: The valueOf() method is typically called automatically by JavaScript in the background, rather than explicitly in the code.

Syntax


Browser Support

All major browsers support the valueOf() method.


Example

Example

Return the primitive value of a String object:

The output of the above example:


❮ Event Onended Prop Canvas Shadowblur ❯