Sign Up

Loops

In Twidget, loops allow you to execute commands multiple times, either based on a condition or through a set number of iterations. Loops can also be nested, meaning you can run loops within other loops, creating complex logic for your tasks.

-

List Loop

The List Loop command enables you to loop through a list of items, executing nested commands for each item in the list.

Count Loop

The Count Loop command repeats the nested commands a specified number of times. You can also specify the order or the iterator.

While Loop

The While Loop command continues to execute nested commands as long as a specified condition holds true.

-

Break

The Break command exits the current loop prematurely, regardless of the remaining iterations or conditions.

Continue

The Continue command skips to the next iteration of the loop, bypassing the remaining commands in the current iteration.

Nested Loops

You can nest loops within other loops to create more complex logical structures.

Use these looping commands to efficiently control the flow of your tasks and manage repetitive actions in Twidget.

Related Topics

Database

Twidget offers many commands to manage data in your database. Below is a list of the available commands and their functionalities: Get Data. Retrieve an entry from a table. Get Multiple Data. Retrieve multiple entries from a table. Save Data. Save an object to a database table. Save Multiple Data. S...

Math

Twidget offers a variety of commands to manipulate numbers. Below are the math commands available, along with their descriptions, inputs, and outputs. Sum. Description: Adds together a list of numbers and returns the sum. - Inputs: - `numbers`: A list of numbers to be added together. - Output: A sin...

Miscellaneous

Twidget provides several miscellaneous commands to facilitate various tasks. Is Null. Description: Checks whether the provided value is null or not. Inputs: - value: The value to be checked. Output: - boolean: Returns `true` if the value is null; otherwise, returns `false`. Not Null. Description: Ch...

Text

Twidget offers a variety of commands to manipulate text in various ways. To Uppercase. Converts all characters of the provided text to uppercase. - text: The text to be converted to uppercase. - A text string with all characters in uppercase. To Lowercase. Converts all characters of the provided tex...

Error Handling

When building applications with Twidget, you may encounter situations where you need to handle errors gracefully to ensure your application runs smoothly. Twidget provides two powerful commands for error handling: `try-catch` and `throw-error`. This documentation will guide you on how to use these c...