JavaScript String valueOf() method

The JavaScript string valueOf() method returns the primitive value of a string object.

Syntax:

string.valueOf() 

Example:

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

Output:

Hello World!
Please Share