

0 / 2 embers
0 / 3000 xp
click for more info
Complete a lesson to start your streak
click for more info
Difficulty: 5
click for more info
Not enough gems
Cost: 6 gems
1: Loops
incomplete
2: Break
incomplete
3: Continue
incomplete
4: While
incomplete
5: For...in
incomplete
This lesson's interactive features are locked, please to keep using them
A traditional "for loop" in JavaScript looks like this:
for (let i = 0; i < 5; i++) {
console.log(i);
}
// 0
// 1
// 2
// 3
// 4
This syntax is common in C-style languages. In English, the code says:
i equals 0. (let i = 0)i is less than 5. Otherwise, exit the loop.i to the console. (console.log(i))1 to i. (i++)Complete the bulkSendCost function. It takes as input a number and returns a number.
For example, for four messages:
1.0 + 0.001.0 + 0.011.0 + 0.021.0 + 0.034.06