+/**
+ * Intentionally inefficient implementation.
+ *
+ * @param {number} n - The number to calculate the factorial of.
+ * @returns {number} - The factorial of n.
+ */
+function factorial (n) {
+ if (n === 0) {
+ return 1
+ } else {
+ return factorial(n - 1) * n
+ }
+}
+