String Object : Constructor Property
- The constructor property returns the function that created the String object’s prototype.
Syntax :
string.constructor
Sample Script
<html> <body> <script type="text/javascript"> var txt = "Hello World!"; document.write(txt.constructor); </script> </body> </html>
Output :
function String() { [native code] }