Favorites

JavaScript continue Statement

☕
Enjoying this site?

Help keep it running with a small coffee donation. Every bit of support is appreciated!

Buy us a coffee
continue
JavaScript Control FlowThis statement is supported by all modern browsers.
Updated 28th November 2026

The continue statement skips the rest of the current loop iteration and moves on to the next one.

Description

The continue statement ends the current iteration of a loop and continues with the next one. In a for loop the update expression still runs. It's often used to skip items that don't need processing, keeping the main code less indented.

Using continue early in a loop body for cases you want to skip keeps the rest of the code at a single level of indentation, which many people find easier to read than wrapping it all in an if. It works in for, for...of, for...in, while and do...while loops, but not inside a forEach() callback, where return does the same job of moving on to the next element.

With a label, continue outer skips to the next iteration of an outer loop from inside a nested one. In a while loop, make sure the code that moves towards the end condition runs before the continue, or the loop may never finish.

Syntax

continue;
continue label;

Example

for (let i = 1; i <= 6; i++) {
  if (i % 2 === 0) continue;
  console.log('odd:', i);
}

Browser Support

The following information will show you the current browser support for the continue statement. Hover over a browser icon to see the version that first introduced support for this statement.

This statement is supported by all modern browsers.

Desktop

Chrome
Edge
Firefox
Opera
Safari

Tablets & Mobile

Chrome Android
Firefox Android
Opera Android
Safari iOS
Samsung Internet
Android WebView
-
Supported Unknown Not supported
☕
Enjoying this site?

Help keep it running with a small coffee donation. Every bit of support is appreciated!

Buy us a coffee