Home
Examples
Docs
6. Loops in targets
The target’s value function is executed only once. If it has an enabledOn function, it will remain active until enabledOn returns true. Once this happens, the value function is executed, and the target will not be executed again
If we want the value function to be executed more than once, we can achieve this in several ways:
1. loop
Enabling the loop property will cause the value function to be called indefinitely:
Copy
Restart
Hide execution
Rewriting the example above using only a declarative target: