Dressed to Impress


#1


Dressed to Impress


Returns error: Unexpected token 'else'

It runs in independent command, but fails in the exercise. I'm sure I'm missing something simple.


var suitcase = {
    shirt: "Hawaiian"
};

if(suitcase.hasOwnProperty("shorts"));{
    console.log(suitcase.shorts);
    } else{
    suitcase.shorts = "red";
    console.log(suitcase.shorts);
}


#2

Nevermind, I figured it out. I had a ; after shorts that I didn't need.


#3

Cool you did! :wink:


#4

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