title: Javascript .map() is not a function
body: <p>I am new here (and new to JavaScript), so please excuse my super basic questions.
  I have a HTML page with different images that all share a class on it. By using getElementsByClassName, I get an array. I want to add an event listener to each of the cells in the array by using the .map() function.</p>
  
  <p>This is what I have:</p>
  
  <pre><code>window.onload = function(){
  var allImgs = document.getElementsByClassName("pft");
  
  var newImgs = allImgs.map(
          function(arrayCell){
              return arrayCell.addEventListener("mouseover, functionName");
          }
      );
  }; 
  </code></pre>
  
  <p>This keeps showing the error "allImgs.map is not a function" even when I change the inner function to something that doesn't include the event listener.</p>
  
  <p>I have another version of this code where I just loop through the array cells within window.onload and add the event listener to each of them that way and it works.
  Why isn't the .map() function working? Can it not be used in window.onload?</p>