title: Getting the first characters of each string in an array in Javascript
body: <pre><code>let animals = ['Hen', 'elephant', 'llama', 'leopard', 'ostrich', 'Whale', 'octopus', 'rabbit', 'lion', 'dog'];
  
  let secretMessage = animals.map(function(animal) {
       for(animal = 0; animal &lt;= animals.length-1; animal++) {
              return animals[animal].charAt(animal);
       }
  });
  
  console.log(secretMessage.join(''));
  </code></pre>
  
  <p>Hi, thru this piece of code i want to output the string <code>HelloWorld</code>, which is formed by the first characters of each string/element in the animals array. However, the output is instead <code>HHHHHHHHHH</code>. I don't know if the for loop is the problem here?</p>
  
  <p>Could someone please tell me why the code produces such an output and how i can modify it in order for the desired result to be returned successfully?</p>
  
  <p>I'm just a novice for now &amp; that's why your help will play a tremendous part in my growth as a programmer. Thanks in advance!</p>