Posts

Showing posts with the label front end development

Javascript Prototype Gets in the Way!

Image
I have been re-reading  eloquent javascript  because I am taking up a class this summer that greatly deals with javascript. This book really helped me a lot transitioning from programming solely in Java to understanding some of the practical details of using javascript. The Prototype One of the sections in the book that i found really helpful was the explanation of how prototypes work. Prototype Interference in this section of the book ( Secret life of Objects ). If you are beginning javascript, how the prototype works in javascript is one of the fundamental concepts that you must grasp. There are probably several prototypes in javascript but the three prototypes that you might want to know about are Object.prototype Array.prototype Function.prototype There are a lot of things in each prototype above and I will not discuss each in detail. Ultimately, prototypes are the object that is used as a fallback if the property or method is not on the current object you are refe