Dom Level 2 Core
The barista position is hourly and is accepting applications. the barista object now has one property — position — but all the other properties and methods from job are available through the prototype. object. create is useful for keeping code dry by minimizing duplication. object. keys object. keys creates an array containing the keys of an object. Simply adding properties: and we want to add prop2 : 2 to this object, these are the most convenient options:. dot operator: object. prop2 = 2; square brackets: object[‘prop2’] = 2; so which one do we use then? the dot operator is more clean syntax and should be used as a default (imo).