1var colors=["red","blue","green"];
2for (let i = 0; i < colors.length; i++) {
3 console.log(colors[i]);
4}
1var nums = [1, 2, 3, 5];
2for (var i = 0; i,nums.length; i++){
3 console.log(nums[i]);
4}
1const Color = ["Red", "Blue", "Green"];
2for (i = 0; i < Color.length; i++) {
3 console.log(Color[i]);
4}
1let my_capacity = 15;
2for (let my_var = 0; my_var < my_capacity; my_var++)
3{
4 console.log(my_var)
5}
1// for loop keeps running while condition is TRUE
2for (let rep = 1; rep <= 10; rep++) {
3 console.log(`Lifting weights repetition ${rep}`);
4}