How do I print only strings


This is my code and its printing all four.

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

// print hello in the 3 different languages
for(var property in languages){


You don't check for typeof property === "string", but typeof languages[property] === "string".
property will give keys, and languages[property] values.


Thankx it helped. Such silly mistake :Psweat_smile: