Skip to content

Instantly share code, notes, and snippets.

@JonathanMatthey
Last active April 12, 2016 13:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JonathanMatthey/6cc337984114de2dec07f54ac7005d22 to your computer and use it in GitHub Desktop.
Save JonathanMatthey/6cc337984114de2dec07f54ac7005d22 to your computer and use it in GitHub Desktop.
scripted-objects1
<!doctype html>
<html lang="en">
<head>
<title>Cars ex 1</title>
<script>
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();
// How would we console the color of the Beetle?
console.log();
// How would we console the year of the Prius?
console.log();
// Update the year of the Prius to 2016
// Console log the year of the Prius
// Add a new 2015 red Challenger to the cars object
// delete the Camry car
</script>
</head>
<body>
Open Inspector > Console to see your results
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment