Skip to content

Latest commit

 

History

History
18 lines (14 loc) · 467 Bytes

File metadata and controls

18 lines (14 loc) · 467 Bytes

More objects!

Object properties can even be assigned other objects or variables too. The example below shows an object with keys that have been assigned a variable, an array, and an object.

var kittenName = "Feathers";

var kitten = {
    name: kittenName,
    toyCollection: ['blue ball', 'green ball', 'hoover box'],
    favoriteLocation: {
        roomName: 'Living room',
        napPlace: 'window',
        idealTemperatureCelsius: 24
    }
};