Skip to content

Commit 97a4ad7

Browse files
committed
Feature(tests): Add examples/factorial
1 parent 844243e commit 97a4ad7

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
2+
{
3+
function factorial(n: number): number {
4+
if (n > 1) {
5+
return n * factorial(n - 1);
6+
}
7+
8+
return 1;
9+
}
10+
11+
console_log(factorial(10));
12+
}

0 commit comments

Comments
 (0)