It loops the integer A variable from starting integer and exits when reached the ending integer.
You can have your own integer variable initialized value to 0 and use it in looping integers.
Its very useful lets say in this case:
You want to create 5 units at the same time and create a special effect each on their position
In this case you can use loops to save huge lines of script like this:
For each integervariablename from 1 to 5 , do Actions
Create 1 unit on point face any degrees
Create special effect at position of last created unit.
Destroy last created special effect
This code saves you from writing 5 repeated script like:
Create 1 unit on point
Create special effect at position of unit
Destroy created effect
^ repeat the lines 5 times
Edit: Can be explainable furthermore by Jass but you said you have low understanding so probably youll not understand it xD.
It also involves in array variables lets say in this case:
You want to set 25 array variable value to 0 at the same time
For each IntegerVariableName from 1 to 25, do Actions
Set MyArrayVariable[ IntegerVariableName ] = 0
^ this simple loops actually transform into:
Set MyArrayVariable[ 1 ] = 0
Set MyArrayVariable[ 2 ] = 0
Set MyArrayVariable[ 3 ] = 0
Until you reached the "Set MyArrayVariable[ 25 ] = 0 "
Its roughly slow to write this type without loops obviously.
Note that the IntegerVariableName value changes everytime in the loop based on the range parameter you have given: " from ( startingnumber to endingnumber ) " ex: from 1 to 10
Also note that using waits inside the loop are not recommended.