Performance criterion translated to Java Script

Hi @MartaT, this fix was made and released in 3.1.0, so if you are using version >= 3.1.0 the loop finishing statement should work (I have tested this in 3.1.2 standalone and it does work). What this will not do is finish your routines that are in the loop. All routines will complete before the loop finishes. In that case, if I only wanted 3 iterations, and my counter starts from zero, but I am incrementing my counter before checking whether the loop should end (which I think is what you are doing), I would check for equality instead:

myCount = myCount + 1
if (myCount === 1) {
    currentLoop.finished = true;  // finish at end of this loop
}