False syntax error?


#1



From what I can see, there are absolutely no problems with this code. However, it keeps returning
Oops, try again. There was a problem with your syntax.

var suitcase = {
    shirt: "Hawaiian"
};

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


#2

Hi, @minecraftiancoder ,

Are all the parentheses closed correctly?


#3

Ah, whoops. I thought I had checked those. Looks like that first one isn't. Thanks!


#4