0

for... if vs switch

Why doesn´t the switch block work? The for.. if block works fine. They should do the same thing.. right? https://code.sololearn.com/WI3gx5HM63Op/#js

24th May 2020, 6:07 PM
Peter Svärd
Peter Svärd - avatar
2 Respostas
+ 2
You still need your for loop. It should be for(word of storyWords ){ switch (word) { ..... } }
24th May 2020, 6:14 PM
Ore
Ore - avatar
+ 1
Worked. Thank you!
24th May 2020, 7:47 PM
Peter Svärd
Peter Svärd - avatar