March 2017
Beginner
358 pages
9h 51m
English
A for loop in JavaScript is generally used to iterate over each instance of something, or to go through each child member of an object or array. For example, you might want to iterate over every member variable in an array.
You can easily generate the scaffolding of a for loop by typing for and pressing Tab. This will iterate over each element in an array called myArray. Of course, assuming you don't have an array called myArray, you'll need to change this to fit the correct name of your array variable. This is common throughout script editor macros, as they only provide a static scaffolding which you'll need to adjust to fit your purpose:
Read now
Unlock full access