JavaScript Symbol.toString() method

The JavaScript Symbol.toString() method retrieves a string representation of an object.

Syntax:

Symbol.toString(); 

Returns:
String representation of an symbol object.

Example:

<!DOCTYPE html>
<html>
<body>
<script>   
var alpha = Symbol.for("a");    
document.write(alpha.toString(alpha));  
</script>
</body>
</html>

Output:

Symbol(a)
Please Share