title: How to pass external scope variable to foreach function
body: <p>I want the domMatch to be visible inside for each arrow function, if the body of the function can see <code>this</code> of outer scope which in my full case is a class there should also be a way to pass domMatch object. </p>
  
  <pre><code>            let tr = document.createElement("tr");
  
              let domMatch = {};
  
              domMatch.status = this.status;
              ... other props
  
  
              Object.getOwnPropertyNames(domMatch).forEach(function (domMatchField, a, b, domMatch) { // domMatch is undefined
                  let cell = tr.insertCell(-1);
  
                  cell.innerText = domMatch[domMatchField];
  
              });
  </code></pre>