Agyan
adda
Run
Reset
Copy
JavaScript Tutorial › JS For Loop › for...of with continue
Back to tutorial
Code
Edit, then press Run or Ctrl+Enter
<pre id="out"></pre> <script> const marks = [45, 82, 30, 91, 67]; let text = 'Passed marks:\n'; for (const m of marks) { if (m < 33) continue; // skip failed marks text += m + '\n'; } document.getElementById('out').textContent = text; </script>
Result