Lesson 11 Putting it all together


// help us make snoopy using literal notation
// Remember snoopy is a "beagle" and is 10 years old.
var snoopy {
age: 10

// help make buddy using constructor notation
// buddy is a "golden retriever" and is 5 years old
var buddy = new Object() {
buddy.species= "golden retriever",
buddy.age= 5

SyntaxError: Unexpected token {

but i think all my { is properly there :disappointed_relieved:

Replace this line with your code.


Constructor Notation does not require brackets { },


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.