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