Hacker News new | ask | show | jobs
by TechpinesMary 4820 days ago
The best way is to add functions to the prototype. Also, here's a good article: http://www.phpied.com/3-ways-to-define-a-javascript-class/