JavaScript - toSource() Number Object

Last Updated Jul 29, 2015, 07:00:14 PM






The Javascript toSource() method responsible for returning a string representing the source code of the object.

Note: This method does not function in Internet Explorer.

Syntax

The following example explains how to use toSource() method


Example

Try It Now

Warning
This feature is non-standard and is not on a standards track. Do not use it on production sites facing the Web: it will not work for every user. There may also be large incompatibilities between implementations and the behavior may change in the future.


Other JavaScript Boolean Object Methods you might want to learn

toString()

valueOf()


Sources and Credits

The source of the content has been referred and updated with Mozilla Developer Network and W3C Organization

Last Updated Jul 29, 2015, 07:00:14 PM



Browser compatibility

Feature
toSource() ? Yes ? ? ? ? ?