JavaScript Symbol.toString() Method

The JavaScript Symbol.toString() method purpose is to return a string representation of an object.

Syntax

Parameters

No Parameters.

Return value

A string representing the specified Symbol object.

Browser Support

Chrome38
Safari9
Firefox36
Opera25

Example 1

Test it Now

Output:

Symbol(JavaTpoint)
Symbol(Java)

Example 2

Test it Now

Output:

Symbol(DBMS)
Symbol(JavaTpoint)





Latest Courses