The JavaScript Function toString() method returns the result in the 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>