SIGN IN SIGN UP

Algorithms and Data Structures implemented in JavaScript for beginners, following best practices.

34083 0 0 JavaScript
import { factorialize } from '../WhileLoopFactorial'
function testFactorial(n, expected) {
test('Testing on ' + n + '!', () => {
expect(factorialize(n)).toBe(expected)
})
}
testFactorial(3, 6)
testFactorial(7, 5040)
testFactorial(0, 1)
testFactorial(12, 479001600)