I’m a JavaScript noob and beginner so don’t get too hard on me. I need to calculate the volume of a cylinder using a constructor function and prototype. I’ve got a form with two inputs which I’ll be getting the values from to do the calculation with. I have to create a new instance when the button is clicked and
Tag: prototype-programming
Benefits of prototypal inheritance over classical?
So I finally stopped dragging my feet all these years and decided to learn JavaScript “properly”. One of the most head-scratching elements of the languages design is its implementation of inheritance. Having experience in Ruby, I was really happy to see closures and dynamic typing; but for the life of me can’t figure out what benefits are to be had