8. Dressed to Impress


#1



The system says "Way to go, go to next lesson"but the black monitor shows "undefined". I didn't print out the message.


var suitcase = {
    shirt: "Hawaiian"
};
if ( suitcase.hasOwnProperty('shorts') ){}
else {
    suitcase.shirt="New shorts"
    console.log(suitcase["shorts"]);
    };

#2

You typed suitcase.shirt instead of suitcase.shorts


#3

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