JavaScript Function toString() methodThe JavaScript Function toString() method returns a string. Here, string represents the source code of the function. SyntaxReturn ValueIt returns a string. JavaScript Function toString() method ExampleExample 1Let's see an example to display a function in the form of string. Test it NowOutput: "function add(a,b) { return a + b; }" "string" Example 2Let's see an example to display the addition of numbers in the form of string. Test it NowOutput: 30 string Example 3Let's see an example to display the ceil value of the given numbers in the form of string. Test it NowOutput: 16 string Next TopicJavaScript Function |
We provides tutorials and interview questions of all technology like java tutorial, android, java frameworks
G-13, 2nd Floor, Sec-3, Noida, UP, 201301, India