In Ruby, I could define a module and then include that in other classes so that those methods will be added to the class definition.
This way, I don't need to duplicate method definitions across different, unrelated classes.
How can I do this in Javascript?
This way, I don't need to duplicate method definitions across different, unrelated classes.
How can I do this in Javascript?