I\'m reading this article about perils of trying to mimic OOP in JavaScript and there\'s the following:
In JavaScript, factory functions are simply co
The simplest pattern is:
function RabbitFactory() { return { speed: 3, getSpeed() { return this.speed; } }; } var rabbit = RabbitFactory();