Prototypes in javascript

JavaScript uses prototypal inheritance. Every object has an internal [[Prototype]] link. When accessing a property, JS walks up the prototype chain. Classes are syntactic sugar over prototypes. Understanding this helps with debugging and performance.