Save it as loopThrough.sh and run with it!
Groovy Strings ” = is a literal string, / is recognized tho. “” = vars are recognized. ”’ = triple quoted strings continue over many lines. The best way to understand is to run this script and play with it.
Random number generator needs its own separate post.
Groovy Advanced Math Fucntions!
Groovy Math Functions!
Loooong numbers can be added in Groovy!
How to Groovy: Integer (MIN and MAX Value) Float (MIN and MAX Value) Double (MIN and MAX Value)
Increment and Decrement Note: Please read the comments in the code for explanation.
How to: Comment Math Operators (Integer and Floating) Order of Operations