loop

Description

Loop through a range of values or a list of elements

Input / Parameter

Output

Object

Callback

callback

The function to be executed when the loop runs successfully.

Example

In this example, we will loop through a range of numbers and print the values as they are looped through in the console.

Steps

  1. Drag a button component to a page in the mobile designer and open up the Action tab.

  2. Select the event click and drag the Control.loop function to the event flow.

  3. Fill in the parameters of the function.

  4. Drag the function to be executed if the loop function is successful to the node below the function. In this example, we are using the Log.write function and change the parameters dropdown to use input

Result

  1. The range of values will be printed in the console.

Last updated