Recomplied example 2.
Add for loop example code.