8. Dressed to impress


#1



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


Error, there was a problem with your syntax


 

var suitcase = {
    shirt: "Hawaiian"
};

if (suitcase.hasOwnProperty('shorts'))
    {
        console.log(suitcase.shorts);
    };

else {
    suitcase.shorts = "solid";
    console.log(suitcase.shorts);
    };


#2

I can't seem to figure out what is wrong. Tried multiple changes, need fresh eyes.


#3

We never write a semi-colon before else; and neither do we write one at the end of the if-else statement (not an error, though).


#4

Thanks, that fixed it.


#6