Hacker News new | comments | show | ask | 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 | Support | API | Security | Lists | Bookmarklet | DMCA | Apply to YC | Contact

Search: