Docs menu

E120: That loop form isn't supported

What compiler error E120 means, and how to fix it.

Turf has two kinds of for loop, and they take different shapes:

Example
for i in 0..10 step i += 1 { ... }          // a counting loop: ONE variable and a rangefor value in numbers { ... }                // for-each over an arrayfor (index, value) in numbers { ... }       // for-each that also gives you the position

The (index, value) pair only makes sense when you walk an array, because a range like 0..10 is the index – there is no second thing to bind:

Example
for (i, x) in 0..10 { ... }                 // not supported

Pick the form that matches what you are looping over: a range gets a single variable; an array can get one or two.

Run turf --explain E120 in a terminal to read this again.

Last updated: Oct 15, 2026Edit this page on GitHub

Esc

Type to search.