Skip to content

Commit 12daa13

Browse files
committed
Remove increment operator
1 parent 8c5f6bd commit 12daa13

File tree

1 file changed

+2
-2
lines changed
  • docs/1-trial-session/09-functions

1 file changed

+2
-2
lines changed

docs/1-trial-session/09-functions/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ const hitTicketCount = 5;
161161
const drawnTicketCount = 3;
162162

163163
let losingProbability = 1;
164-
for (let i = 0; i < drawnTicketCount; i++) {
164+
for (let i = 0; i < drawnTicketCount; i += 1) {
165165
losingProbability *=
166166
(totalTicketCount - hitTicketCount - i) / (totalTicketCount - i);
167167
}
@@ -195,7 +195,7 @@ function calculateWinningProbability(
195195
drawnTicketCount,
196196
) {
197197
let losingProbability = 1;
198-
for (let i = 0; i < drawnTicketCount; i++) {
198+
for (let i = 0; i < drawnTicketCount; i += 1) {
199199
losingProbability *=
200200
(totalTicketCount - hitTicketCount - i) / (totalTicketCount - i);
201201
}

0 commit comments

Comments
 (0)