Hacker News new | past | comments | ask | show | jobs | submit login

His example has an error. He forgot to return newObject at the end of the fromPrototype function. The fromPrototype function returns an instance (an object) that inherits from the given prototype and with the same properties you passed in with the object.



Thanks.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: