Closed gesnype closed 4 years ago
Hi, I'm trying to write an if statement in my for loop. The if statement should check if the n iteration is the last one. The code should be "if n not equal to array.length"
Is there such an operator?
Here's the code for TagUI v6 syntax, to check if it is the last iteration - CC @siowyisheng
for n from 1 to array.length echo `n` if n equals to array.length echo LAST ITERATION
Hi, I'm trying to write an if statement in my for loop. The if statement should check if the n iteration is the last one. The code should be "if n not equal to array.length"
Is there such an operator?