8.) Dressed to Impress Unexpected Identifier


#1

So my code is below and my error is SyntaxError: Unexpected Identifier but I don't know if that is the real problem since I am not sure about how I have set up my code... Any help would be appreciated!

Lesson Link: https://www.codecademy.com/en/courses/objects-ii/1/3?curriculum_id=506324b3a7dffd00020bf661#


var suitcase = {
    shirt: "Hawaiian"
};

if(suitcase.hasOwnProperty('shirt')) {
    print suitcase.shirt
}else{
    suitcase.shorts = "banana";
}


#2

print is python, not js? js is console.log()


#3

Haha thank you lol Lets see if that will fix my problems XD


#4

Yep that worked... sigh my learning of different languages at the same time is bleeding over into each other :stuck_out_tongue:


#5

yep, you have to be careful to use the right syntax in the right language :stuck_out_tongue:


#6

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