11/33 Putting it all together


#1

"Oops, try again. Buddy should have a property named 'species' that is set to 'golden retriever'" I don't understand what's my mistake please help. Thanks.

// help us make snoopy using literal notation
// Remember snoopy is a "beagle" and is 10 years old.
var snoopy = {
species: "beagle",
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 retiever";
buddy.age = 5;


#2

Found my mistake no need to reply guys :smile:


#3

what was the mistake


#4

it is new.Object(); instead of new Object(); and spelling


#5

what was wrong with it ?


#6

They just spelled retriever wrong that's all.


#7

I didn't see the mistake?! But I have the same mistake too and code is the same... Could you help me, please!


#8

Sorry! In this code I saw the mistake, but in my code I didn't see. In literal notation there isn't ";" in the end. But this is my code:
// help us make snoopy using literal notation
// Remember snoopy is a "beagle" and is 10 years old.
var snoopy = {
snoopy.species: "beagle",
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";


#9

But I want to continue this course....


#10

The message for my mistake is: "Oops, try again. There was a problem with your syntax. SyntaxError: missing : after property id"


#11

I am ready. If someone need help, this is the correct code:
// help us make snoopy using literal notation
// Remember snoopy is a "beagle" and is 10 years old.
var snoopy = {
species: "beagle",
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;


#12

You could solve this problems?
I need help.