[Chapter 21] Reference: Function.toString()
Author: David Flanagan
Date: Fri Aug 29 11:16:18 1997

#

| Chapter 21 JavaScript Reference |

# Function.toString() Method

## Name

Function.toString() Method---convert a function to a string

## Availability

Navigator 2.0, Internet Explorer 3.0

## Synopsis

    function.toString()

### Arguments

None.

### Returns

A string that represents the function.

## Description

The `toString()` method of the Function object converts a function to a string. In Navigator 2.0 and 3.0, it returns a string of valid JavaScript code--code that includes the `function` keyword, argument list, the complete body of the function, and so on. In Internet Explorer 3.0, the `toString()` method returns a string that identifies the function but that does not include the JavaScript code that constitutes the function.

## See Also

"Function", "Object.toString()"

Function.prototype |  | getClass()