We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d6c280c commit a504c19Copy full SHA for a504c19
lesson_07/conditionals/src/lesson7.ts
@@ -115,9 +115,8 @@ export function convertGpaToLetterGrade(gpa: number): string {
115
* @return The factorial of n.
116
*/
117
export function computeFactorial(n: number): number {
118
- let fact = 0;
+ let fact = 1;
119
if (n>0){
120
- fact = 1;
121
const numbers = Array.from({ length: n }, (_, index) => index + 1);
122
for (const i of numbers) {
123
fact *= i;
0 commit comments