title: How to iterate through a nodeList functional style
body: <p>I frequently want to iterate through a NodeList with forEach or map. My simplified code works like this:</p>
  
  <pre><code>var nodeListMap = Array.prototype.map;
  var els = document.querySelectorAll('.classname');
  nodeListMap.call(els, function(el){...});
  </code></pre>
  
  <p>This works fine. However, I'd prefer not have to <code>map.call</code>, but if I do this...</p>
  
  <pre><code>var nodeListMap = Array.prototype.map.call;
  var els = document.querySelectorAll('.classname');
  nodeListMap(els, function(el){...});
  </code></pre>
  
  <p>Then it returns</p>
  
  <pre><code>TypeError: object is not a function
  </code></pre>
  
  <p>How can I modify the code so I simply do <code>nodeListMap(array, fn)</code>?</p>