I just found out that when you call toString() on a javascript function, as in myFunction.toString(), the source code of that function is returned.
myFunction.toString()
If y
function.ToString - Returns a string representing the source code of the function. For Function objects, the built-in toString method decompiles the function back into the JavaScript source that defines the function.
Read this on mozilla.