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

This method is less efficient than using prototypes because the created instance will lug around an object with its own function, instead of sharing one. Sometimes I use "factories" for cases where my instance only needs one method or if the number of instances is going to be relatively small.



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

Search: