Practice exercises with loops
Challenge:
Create a pattern where each line has one more star than the previous line.
let rows = 5
for (let i = 0; i < rows; i++) {
let stars = ""
for (let j = 0; j <= i; j++) {
stars += "*"
}
console.log(stars)
} Tip:
Notice how we use i in the inner loop's condition. Each row prints exactly i + 1 stars!