google sheet script editor loop code example Example: google script for loop for(var i = 0; i < 5; i++) { num = num * i+1; }