How to use function toString methods in Javascript
Description
For functions, the methods
toLocaleString()
and toString()
always return the function's code.
Example
var f = function sayColor(){
console.log("asdf");
}
console.log(f.toLocaleString());
The code above generates the following result.