27. Looks For-In to me problems!


#1

Oops, try again. It looks like you didn't print Hello!

What did I do wrong?

var languages = {
  english: "Hello!",
  french: "Bonjour!",
  notALanguage: 4,
  spanish: "Hola!"
};

// print hello in the 3 different languages
for (var key in languages) {
  if (typeof languages[key] == "string") {
    console.log(languages[key]);
  }
}

#2

Did you try after refreshing your browser?


#3

Try using === instead of ==.


#4

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