Open zzz6519003 opened 5 years ago
“A prototype can be used at any time to add new properties and methods to all objects based on it.”
“One way to create an object is by using a curly brace notation. […] Inside the curly braces, we can give a list of properties separated by commas. Each property is written as a name, followed by a colon, followed by an expression that provides a value for the property. […] Properties whose names are not valid variable names or valid numbers have to be quoted.”
Lesson learned: object properties can be named pretty much anything you want! And all objects inherit properties and methods from their prototypes. There’s much more to learn, but I think now I might know just enough to tackle the next exercism.io practice problem! Maybe I can give that a try tomorrow.
“A prototype is another object that is used as a fallback source of properties. When an object gets a request for a property that it does not have, its prototype will be searched for the property, then the prototype’s prototype, and so on.”