JavaScript String toString()

The JavaScript string toString() method retrieves a string representing the particular object.

Syntax:

object.toString() 

Example:

<!DOCTYPE html>
<html>
<body>
<script>   
var a ="Hello World!";  
document.write(a.toString());  
</script>
</body>
</html>

Output:

Hello World!
Please Share