for i in 1...3 {
for j in 1...3 {
if j == 2 {
continue
}
print("i = (i), j = (j)")
}
}
// outer loop
for week in 1...3 {
print("Week: (week)")
// inner loop
for day in 1...7 {
if(week == 2) {
// use of break statement
break
}
print(" Day: (day)")
}
print("")
}
// outer for loop
for i in 1...3 {
// inner for loop
for j in 1...3 {
if i == 2 {
break
}
print("i = (i), j = (j)")
}
}