Constructor function return is other than “[Object object]”
问题 When I use the String constructor I allways wonder how is it made.It returns the string you specificed as a parameter even though it is instanciated with the "new" operator like : var str = new String("Hello World") //str == "Hello World" If I make a constructor and I give it a return value it returns an Object when instanciated : function CreateString(st) { return ''+st } var MyString = new CreateString("Hello there!") //MyString == "[Object object]" How can I create a constructor that