DEV Community

Cover image for Need help with writing JavaScript using prototypes
atrobdem
atrobdem

Posted on

Need help with writing JavaScript using prototypes

I've bought a Bootstrap + jQuery SAAS Theme which I'm now trying to edit to fit my companies brand. However, the JavaScript is written in a very interesting manner unfamiliar to me, with functions being inside a prototype of an object. This is very different to what I'm used to which is writing DOM manipulations just as a function. I'm looking for any guidance on this as well as any tutorials if there are any out there. So far, every JavaScript tutorial that I have managed to find only covers the very basics of prototypes. It has been very difficult to find any practical guide on how to use them as well as advantages and disadvantages of doing so in comparison to the common way of writing JavaScript.

I've attached a couple of images to illustrate what I'm talking
about.

Alt Text

Alt Text

Top comments (0)