Repeat

Run part of the program the number of times you say.

for(let i = 0; i < 4; ++i) {
}

Example: Blinking heart

Flash the heart icon on the screen 4 times.

for (let i = 0; i < 4; i++) {
    basic.showIcon(IconNames.Heart)
    basic.pause(300)
    basic.clearScreen()
    basic.pause(300)
}