Skip to content

Commit fb27425

Browse files
author
Christian Bender
committed
Used the *= operator by factorial.ts
1 parent 90aaa3c commit fb27425

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)