← Back to JavaScript exercises

8. Prime Number

Result appears here
const n=29;output.textContent=Array.from({length:n-2},(_,i)=>i+2).every(x=>n%x);