27/30 the other way


#1

I used not if - else, but other way, is it correct?
for (var x in languages) {
switch(typeof languages[x] ){
case 'string':
console.log(languages[x]);
break;
}
};


#3

But it is working, why it is wrong to use it?


#4

I thought that the course don't accept your code.
I tried it and 27/30 accepts your code then no problem, you can use it freely.