title: Trying to return the name from Artist class, not sure where I'm going wrong
body: <p>I'm creating an array of artists and I want to eventually pick a random artist from the bunch. But I can't get it to display the artist's name.</p>
  <pre><code>const artistDiv = document.querySelector(&quot;.random-artist&quot;);
  
  let artists = [];
  
  function Artist(name) {
    this.name = name;
  }
  
  const test = &quot;test&quot;;
  
  function addArtists() {
      artists.push(new Artist(test));
  }
  
  let x = Math.random() * (artists.length - 1);
  let randomArtist = artists[x].name;
  
  artistDiv.innerHTML = randomArtist;
  </code></pre>