If display(15) i want the result 1, 2, 3, 4, 5, 6, 8, 9, 10, 12, 15, 16, 18, 20, 24 : <p>I have code and if display(15) i want the result is 1, 2, 3, 4, 5, 6, 8, 9, 10, 12, 15, 16, 18, 20, 24 please help me </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>function daz(num){
  for(var i = 1; i &lt; num; i++){
    if(num % 7 === 0 || num % 11 === 0 || num % 14 === 0){return false}
    if(num % 2 === 0 || num % 3 === 0 || num % 4 ===0 || num % 5 === 0){
      return true;
    }
  }
}
function display(n){
  var zumba = [1];
  for(var i = 1; i&lt;=n;i++){
    if(daz(i)){
      zumba.push(i);
    }
  }
  document.write(zumba);
}

display(15)</code></pre>
</div>
</div>
</p>
