mirror of
https://github.com/TheAlgorithms/JavaScript.git
synced 2025-12-19 06:58:15 +08:00
Remove live code & console.log, leave examples as comments (Geometry, Graphs, Maths).
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
author: Theepag
|
||||
*/
|
||||
const factorialize = (num) => {
|
||||
export const factorialize = (num) => {
|
||||
// Step 1. variable result to store num
|
||||
let result = num
|
||||
// If num = 0 OR 1, the factorial will return 1
|
||||
@@ -14,6 +14,3 @@ const factorialize = (num) => {
|
||||
// Step 3. Return the factorial
|
||||
return result
|
||||
}
|
||||
// test
|
||||
console.log(factorialize(5))
|
||||
console.log(factorialize(4))
|
||||
|
||||
Reference in New Issue
Block a user