 <pre><code>function dividedByArray(data,low,high) { for (i=low; i&lt;=high; i++) { var passed = 0; for(var curr in data) { if(i % data[curr] === 0) { passed++; } } switch(passed) { case data.length : console.log(i + 'all_match'); break; case 0 : console.log(i) break; default: console.log(i + " one_match"); } } } </code></pre>