Created
April 14, 2016 20:56
-
-
Save anonymous/8016bbcf59fc96ae20a9c6d133cd41f1 to your computer and use it in GitHub Desktop.
JS Bin // source https://jsbin.com/seyake
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width"> | |
<title>JS Bin</title> | |
</head> | |
<body> | |
<script id="jsbin-javascript"> | |
var cars ={ | |
Beetle: { | |
color: "orange", | |
year: 2005 | |
}, | |
Camry: { | |
color: "purple", | |
year: 1998 | |
}, | |
Prius: { | |
color: "black", | |
year: 2014 | |
} | |
}; | |
// How would we console the object Beetle? | |
console.log(cars.Beetle); | |
// How would we console the color of the Beetle? | |
console.log(cars.Beetle.color); | |
// How would we console the year of the Prius? | |
console.log(cars.Prius.year); | |
</script> | |
<script id="jsbin-source-javascript" type="text/javascript">var cars ={ | |
Beetle: { | |
color: "orange", | |
year: 2005 | |
}, | |
Camry: { | |
color: "purple", | |
year: 1998 | |
}, | |
Prius: { | |
color: "black", | |
year: 2014 | |
} | |
}; | |
// How would we console the object Beetle? | |
console.log(cars.Beetle); | |
// How would we console the color of the Beetle? | |
console.log(cars.Beetle.color); | |
// How would we console the year of the Prius? | |
console.log(cars.Prius.year);</script></body> | |
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var cars ={ | |
Beetle: { | |
color: "orange", | |
year: 2005 | |
}, | |
Camry: { | |
color: "purple", | |
year: 1998 | |
}, | |
Prius: { | |
color: "black", | |
year: 2014 | |
} | |
}; | |
// How would we console the object Beetle? | |
console.log(cars.Beetle); | |
// How would we console the color of the Beetle? | |
console.log(cars.Beetle.color); | |
// How would we console the year of the Prius? | |
console.log(cars.Prius.year); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment