Last active
April 12, 2016 13:06
-
-
Save JonathanMatthey/6cc337984114de2dec07f54ac7005d22 to your computer and use it in GitHub Desktop.
scripted-objects1
This file contains hidden or 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 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