# continue

## Description

Will continues to the next iteration of loop

## Input / Parameter

N/A

## Output

N/A

## Callback

N/A

## Example

In this example, we will do console logging by using `console` function in `forLoop` function callback to demonstrate how `continue` works.

### Code Equivalent

```
for (let i = 1; i < 10; i++) {
  console.log(i);
  
  if (i == 8) {
    // Continue to next iteration
    continue;
  }
  
  console.log("some text")
}
```

### Steps

1. Drag a `button` component into the canvas and open the `Action` tab. Select the `press` event of the button and drag the `forLoop` function to the event flow, add the value `1` on `start` param and add the value `9` on `end` param.

   ![](https://399701567-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwmJ1RKjM2uNFaL6fO3Xu%2Fuploads%2Fgit-blob-d4f0933ea5c00837cd2d015049f57da569b79c6e%2Fcontinue-step-1.png?alt=media)
2. Drag the function `console` to the `forLoop` function yes callback, on it's `value` param change the param type to input.

   ![](https://399701567-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwmJ1RKjM2uNFaL6fO3Xu%2Fuploads%2Fgit-blob-dd82807e3f8b2e0444b1bddd370fc6cef194d594%2Fcontinue-step-2.png?alt=media)
3. Drag the function `conditional` inside function `forLoop` yes callback, on param `condition` change the param type to subflow/function. Inside param `condition` subflow add `equal` function then on it's `value1` param change the param type to input and on it's `value2` param add value `8`.

   ![](https://399701567-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwmJ1RKjM2uNFaL6fO3Xu%2Fuploads%2Fgit-blob-97bb266998d3153cc97c36728aa06f80386fee43%2Fcontinue-step-3.png?alt=media)
4. Drag the function `continue` inside function `conditional` yes callback.

   ![](https://399701567-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwmJ1RKjM2uNFaL6fO3Xu%2Fuploads%2Fgit-blob-7e1f8aa75e0f60c0594061b906101fefd05f49de%2Fcontinue-step-4.png?alt=media)
5. Drag the function `console` after function `conditional`, add value `some text` on it's `value` param.

   ![](https://399701567-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwmJ1RKjM2uNFaL6fO3Xu%2Fuploads%2Fgit-blob-63a7ceab87e2bfcbc39cf6d9055cc638fb09cab8%2Fcontinue-step-5.png?alt=media)

### Result

1. Now click the button in preview, it will show the list current loop number followed with `some text` on the console, notice that the `continue` function will ignore the 8th `some text`.

   ![](https://399701567-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwmJ1RKjM2uNFaL6fO3Xu%2Fuploads%2Fgit-blob-2a15783678119967da88bd30966f8a4efcaa67fa%2Fcontinue-result-1.png?alt=media)

## Links

### Related Information

See also:

* Functions
  * [conditional](https://docs.emobiq.com/emobiq-client/006-actions-and-visual-logic/action-reference/cordova/flow/conditional)
