Skip to content

Commit fe92fc5

Browse files
authored
Merge pull request loiane#56 from christianbender/changed_code
Used the *= operator by factorial.ts
2 parents f1f0211 + fb27425 commit fe92fc5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/ts/others/factorial.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ export function factorialIterative(number: number) {
44
}
55
let total = 1;
66
for (let n = number; n > 1; n--) {
7-
total = total * n;
7+
total *= n;
88
}
99
return total;
1010
}

0 commit comments

Comments
 (0)