Opens in a new tab
A picture of Jeff Brigman
I CODE TODAY FOR
A BETTER TOMORROW

Glossary Term

Function.prototype.toString()

2 tags 1 category

The toString() method of Function instances returns a string representing the source code of this function.

The Function object overrides the toString() method inherited from Object; it does not inherit Object.prototype.toString. For user-defined Function objects, the toString method returns a string containing the source text segment which was used to define the function.

JavaScript calls the toString method automatically when a Function is to be represented as a text value, e.g., when a function is concatenated with a string.

The toString() method will throw a TypeError exception (“Function.prototype.toString called on incompatible object”), if its this value object is not a Function object.

Syntax example: toString()

Term Connections

Explore related terms connected by shared tags, shared categories, and relationship phrases. This map loads only when it comes into view.

Loading term connections…