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>
Please follow and like us:
Content Protection by DMCA.com