This repository has been archived by the owner on Oct 13, 2024. It is now read-only.
🚀 New For Loop Syntax
Release Description
With this Release you can enjoy new for-loop syntax in AssembleScript
- For Each Loop
Use case: Use thewakandaForEach
keyword for loops. Declare a new variable, specify the condition, and execute the code within the loop. Use step to increment or decrement the value of an iterator.
Syntax:
wakandaForEach(i in 10 to 20){
vision(i);
}
vision();
wakandaForEach(i in 10 to 0 step 2){
vision(i);
}
- For Loop
Use Case: Use the wakandaFor keyword for loops. Declare a new variable, specify the condition, and execute the code within the loop.
Syntax
wakandaFor(newAvenger i = 0; i < 20; i = i + 1){
vision(i);
}
🛡️ Happy Coding!!!