

0 / 2 embers
0 / 3000 xp
click for more info
Complete a lesson to start your streak
click for more info
Difficulty: 8
click for more info
Not enough gems
Cost: 6 gems
1: Loops in Go
incomplete
2: Omitting Conditions from a for Loop in Go
incomplete
3: There Is No While Loop in Go
incomplete
4: Fizzbuzz
incomplete
5: Continue & Break
incomplete
6: Connections
incomplete
Back
ctrl+,
Next
ctrl+.
This lesson's interactive features are locked, please to keep using them
Loops in Go can omit sections of a for loop. For example, the CONDITION (middle part) can be omitted which causes the loop to run forever.
for INITIAL; ; AFTER {
// do something forever
}
Complete the maxMessages function. The parameter thresh is your total budget in pennies. Return the maximum number of whole messages you can send without the total cost ever exceeding thresh.
Each message costs 100 pennies, plus an additional fee. The fee structure is:
100 + 0100 + 1100 + 2100 + 3If you lock up your browser by creating an infinite loop that isn't breaking, just click the cancel button.