I can't find a complete syntax spec on the developer pages. I'm really wondering if there's an extended for loop ...
https://developers.google.com/apps-script/
I see the Default services, but that isn't defining what control flow syntax we can use. Is it precisely some version of JavaScript?