How to use toSource in JavaScript

In this article, I will explain use of toSource () Method in JavaScript.
  • 1149

JavaScript toSource() Method

  • toSource() method returns the string "Math".

  • toSource() method does not work with many browsers like IE.

Syntax

Math.toSource()

Example

In the following example show to how the toSource() method can be used.

<html>

<head>

<title>JavaScript Math toSource() Method</title>

</head>

<body>

<h3 style="color:Blue">JavaScript toSource() Method Example</h3>

<script type="text/javascript">

    var value = Math.toSource();

    document.write("Value of tosource() method: " + value);

</script>

</body>

</html>

Output

tosource method.jpg

You may also want to read these related articles here

Ask Your Question 

Got a programming related question? You may want to post your question here

Programming Answers here

Categories

More Articles

© 2020 DotNetHeaven. All rights reserved.