Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

That’s one of the neat things about JS: even outside the prototypal inheritance chain, classes can be (partially) composed of generalized, reusable functions, a bit like traits. Just import a function and bind it in the constructor (call).


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

Search: