The JavaScript Function toString() method returns the result in a form of a string.
Syntax:
function.toString()
Return:
String
Example:
<!DOCTYPE html> <html> <body> <script> function mul(x,y) { return x*y; } document.writeln(mul.toString()); </script> </body> </html> |
Output:
function mul(x,y) { return x*y; } |
Please Share