<html>
<body>
<p>The constructor property returns the function that created the string's prototype:</p>
<p id="demo"></p>
<script>
var str = "Hello World!";
document.getElementById("demo").innerHTML = str.constructor;
</script>
</body>
</html>