title: Map function on an array not working in React
body: <p>I'm new to ReactJS. Somehow, I'm unable to get proper output using map on array.</p>
  <p>I have an array named pets.</p>
  <pre><code>  const pets = [{
      name: 'Bruno',
      type: 'Dog',
      description: 'Bruno is funny and lovable',
      skills: ['fetch', 'being cute', 'roll over'],
      image: 'https://www.dogbreedinfo.com/images17/LabmaranerCasey6Weeks1.JPG'
    },
    {
      name: 'Rocky',
      type: 'Dog',
      description: 'Rocky is funny and lovable',
      skills: ['bite', 'being cute', 'roll over'],
      image: 'https://st.depositphotos.com/1000291/3041/i/950/depositphotos_30415145-stock-photo-white-labrador-puppy.jpg'
    }];
  </code></pre>
  <p>And I'm trying to display using map as below.</p>
  <pre><code>  &lt;div&gt;
      &lt;h1&gt;My pets&lt;/h1&gt;
      &lt;ul&gt;
        {
          pets.map((pet, index) =&gt; {             
            &lt;li key={index}&gt;
              &lt;h1&gt; {pet.name} &lt;/h1&gt;
            &lt;/li&gt;
          })
        }
      &lt;/ul&gt;
  
    &lt;/div&gt;
  </code></pre>
  <p>Doing this is not displaying any data from the array.</p>
  <p>What is wrong with my code , can someone tell me?</p>