benjaminvr

Codecademy - for..of loop exercise

Oct 3rd, 2021
203
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. const pokemonList = ['Pikachu', 'Charizard', 'Squirtle', 'Yoshi', 'Snorlax'];
  2.  
  3. for(let poke of pokemonList){
  4.   if(!(poke == 'Yoshi')){
  5.     console.log(`You caught a ${poke}!`);
  6.   } else {
  7.     continue;
  8.   }
  9. }
Advertisement
Add Comment
Please, Sign In to add comment