title: Why I can't console.log this function?
body: <pre><code>let fetchPokemons = async() =&gt;{
      for(let i = 0; i &lt; 50; i++){
          await getPokemon(i);
      }
  }
  
  
  let getPokemon= async id =&gt; {
      let response1 = await fetch(`https://pokeapi.co/api/v2/pokemon/${id}`);
      let pokemon = await response1.json();
      pokedex(pokemon);
  }
  
  function pokedex(pokemon){
      console.log(pokemon.types)
  }
  
  fetchPokemons();
  </code></pre>
  
  <p>I am trying to create a Pokedex. 
  From my understanding this code does the following:</p>
  
  <p>FetchPokemon function will run first. 
  Inside it, getPokemon will Run. </p>
  
  <p>After getting the response from API Pokedex function will run.</p>
  
  <p>So I am testing whether pokemon data are coming back or not by console.logging the pokemon.types inside Pokedex function.</p>
  
  <p>So Am I understanding wrongly?</p>