title: Reading array elements with forEach in reactjs
body: <p>I am a beginner in React. I have a pretty simple code. (There are other questions which seems to be duplicate of this but they ain't. Please read the contents also not just the question heading before marking duplicate.)</p>
  
  <pre><code>import React, { Component } from 'react';
  class Likes extends Component {
    render() {
      var music=["linkin park", "led zaplin", "regina spector", "bruno mars"];
      return(
      {
        music.forEach(function (value, index, array) {
            &lt;h1&gt;{value}&lt;/h1&gt;
         })
        }
      );
    }
  }
  export default Likes;
  </code></pre>
  
  <p>Is it correct way or should I use <code>state</code>. I wanted to keep it as simple as possible. But I'm getting this.<a href="https://i.stack.imgur.com/rLPy6.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/rLPy6.png" alt="(see attached image)"></a></p>
  
  <p>What is that I am missing. What else I should know.</p>
  
  <p>PS: I dont have any other separate component or code. Everything is there inside the class itself.</p>