title: How to add multiple classes to an img element
body: <p>I am tring to add a class sprite to all the images. Moreover if eachName[1] is bulbasaur, I want to add a class found to it, and otherwise I want to add a class unfound to them. This code could catch a class sprite correctly, but could not catch found/unfound. Is there something wrong in this code? Thanks.</p>
  
  <pre><code>            var picArr = this.responseText.split("\n");
              for(var i=0; i &lt; picArr.length; i++){
                  var eachName = picArr[i].split(":")
                  var spriteurl = "/Pokedex/sprites/" + eachName[1];
                  var imgClass = 'sprite';
                  if(eachName[1]==='bulbasaur.png'){
                      imgClass += ' found';
                  } else {
                      imgClass += ' unfound';
                  }
                  document.getElementById("pokedex-view").innerHTML += "&lt;img src=" + spriteurl + " class=" + imgClass + "&gt;";
              }
  </code></pre>