const getPrimes = n => { const a = []; lab: for (let i = 1; i <= n; i++) { for (let j = 1; j < a.length; j++) { if (i % a[j] === 0) { continue lab; } } a.push(i); } return a; }
lab: