<html>
<body>
<p id="demo"></p>
<script>
var x = "John"; // x is a string
var y = new String("John"); // y is an object
document.getElementById("demo").innerHTML =
typeof x + "<br>" + typeof y;
</script>
</body>
<!-- Mirrored from www.w3schools.com/js/tryit.asp?filename=tryjs_string_object by HTTrack Website Copier/3.x [XR&CO'2014], Mon, 27 Jan 2020 02:39:29 GMT -->
</html>