For loops not working as expected in Postman


Im using postman and need for loops in both pre-scripts and tests. This is because responses are changing a lot, and they’re SOAP XML. Anyway, i use for loops but they dont work as they dont loop.

See screenshot, the loop will only print out 0, and not the following integers. Is this a bug or what am i experiencing here?

Check console. It may be your following line is breaking for i=1 (You can comment and try running the loop… It prints all i’s properly)
//let actualspeed = …