title: Can I always use .map even if .forEach looks more logical in come circumstances?
body: <p>I see <code>.map()</code> and <code>.forEach()</code> work similar in most cases, though I know <code>.map()</code> is more suitable for returning some result based on transforming input, and <code>.forEach()</code> is just to iterate over items and apply some operation on each.</p>
  
  <p>I know it suits well in this case:</p>
  
  <pre><code>var customersList = dataItems.map(function (item) {
      return item.isCustomer
  })
  </code></pre>
  
  <p>But I find it easier to just throw <code>.forEach()</code> out of my head and just use <code>.map()</code> in all my code. Would it be conceptually correct to use <code>.map()</code> in a case like this?</p>
  
  <pre><code>domElements.map(function (el) {
      if (el.enabled) {
          el.show()
      } else {
          el.hide()
      }
  })
  </code></pre>