We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6c03226 commit 6994cf8Copy full SHA for 6994cf8
1 file changed
app/mathUtils.js
@@ -0,0 +1,13 @@
1
+export function square(x) {
2
+ return x * x;
3
+ }
4
+
5
+ export function cube(x) {
6
+ return x * x * x;
7
8
9
+ export function factorial(n) {
10
+ if (n === 0) return 1;
11
+ return n * factorial(n - 1);
12
13
0 commit comments