CodesJava

Easy learning with example program codes

JavaScript Function toString() method

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 follow and like us:
error








Copyright © 2019 CodesJava DMCA.com Protection Status