When I first began programming with JavaScript, I created my variables and then encapsulated any functionality I needed to reuse into a function. As my tasks got more complicated and as I started learning object-oriented programming in other languages, I began to see the benefits of applying that to JavaScript. In JavaScript, a function is an object; creating a function creates an object. Function
![Objectifying JavaScript - Digital Web](https://cdn-ak-scissors.b.st-hatena.com/image/square/ef316e05960abde3ceda0eb1927c2cfb96987c8b/height=288;version=1;width=512/https%3A%2F%2Fwww.digital-web.com%2Fwp-content%2Fuploads%2F2006%2F09%2Fcode-583073__340.jpg)