<!DOCTYPE html>
<html lang="en-US">
<body>
<script>
var strObj = new String("bar");
document.write("strObj = " +typeof strObj);
//find value of string object
var result = strObj.valueOf();
document.write("<br>result = "+typeof result);
</script> </body>
</html>