[removed] using typeof to check if string

前端 未结 6 1943
萌比男神i
萌比男神i 2021-02-14 15:32

I\'m working on a codecademy.com exercise where we use for-in statements to loop through an object and print hello in different languages by checking to see if the values of the

6条回答
  •  猫巷女王i
    2021-02-14 16:08

    this is the for in value to work for me

    for(var x in languages){

    if(typeof languages[x] === "string"){
        console.log(languages[x]);
    } else }
    

提交回复
热议问题