Function.toString

toString — Returns a string representation of the specified Function object.

Description

Function.toString()

Return values

string primitive.

Examples

Example #1 – toString example
var f = function () { return this; }; console.log(typeof f.toString()); // Will return "string". console.log(f.toString()); // Will return a string representation of the function.

External references