How to convert iterator code from C# to GDscript?

Godot Version

Godot 4.8 beta 1

Question

I need some help to convert a C# iteration code to GDScript

This is the C# code :

for (int i == tempHealth; i >= newHealth; i--) {
   if (i == newHealth) {
       // Do things
   }
}


for (int j == tempHealth; j <= newHealth; j++) {
   if (j == newHealth) {
       // Do things
   }
}

How can I translate that into GDScript ?

Probably something like this:

for i: int in range(tempHealth, newHealth - 1, -1):
    if i == newHealth:
        pass

for j: int in range(tempHealth, newHealth + 1):
    if j == newHealth:
        pass

Thanks. I’m going to compare both c# and gdscript results to what i’ll get.