JavaScript - Math toSource Method


Advertisements


Description

This method returns the string "Math". But this method does not work with IE.

Syntax

Its syntax is as follows −

Math.toSource() ;

Return Value

Returns the string "Math".

Example

Try the following example program.

<html>
   
   <head>
      <title>JavaScript Math toSource() Method</title>
   </head>
   
   <body>
      
      <script type="text/javascript">
         var value = Math.toSource( );
         document.write("Value : " +  value );
      </script>
      
   </body>
</html>

Output

Value : Math 

javascript_math_object.htm