UX Design and Development course

Working with object initializers

Shorthand for creating small scale instance objects

father = {name: 'Harrison Ford', age: 71};
daughter = {name: 'Calista Flockhart', age: 48};

Now that we have new objects with properties and values, lets get those back.

console.log(father);
console.log(daughter);

Play with code

JS Bin