title: Javascript While loop condition with no-cond-assign error
body: <p><strong>Error:</strong> Expected a conditional expression and instead saw an assignment. (<code>no-cond-assign</code>)</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>const re = /&lt;%([^%&gt;]+)?%&gt;/g;
  let match;
  while (match = re.exec('&lt;%hello%&gt; you &lt;%!%&gt;')) {
    console.log(match);
  }</code></pre>
  </div>
  </div>
  </p>
  
  <p>Doing a <code>while</code> loop to reassign match, but getting <code>no-cond-assign</code> error. I can still get output without errors but what is the best way to correct the syntax? Thanks</p>