Menu
I’m at the end of chapter 4 of “Object Oriented Javascript” where the author, Stoyan Stefanov, asks you to recreate the String() method of the global Object with a constructor function named MyString(). He then asks you to test your recreation with the following code:
var s = new MyString(‘hello’);
s.length;
s.concat(‘ world!);
s.charAt(‘2’);
etc. etc.
He suggests using a for-in to loop through the input string. I’m stumped on this. Any suggestions? Just hints though, I don’t want anyone to writ out the whole function.
Thanks,
commakozzi