mirror of
https://github.com/TheAlgorithms/JavaScript.git
synced 2025-07-05 00:01:37 +08:00
Use ESM syntax and remove console.log()
This commit is contained in:
@ -33,6 +33,4 @@ const factorialDigitSum = (n = 100) => {
|
||||
return digits.reduce((prev, current) => prev + current, 0)
|
||||
}
|
||||
|
||||
console.log('Factorial digit sum of 100! :', factorialDigitSum())
|
||||
|
||||
module.exports = factorialDigitSum
|
||||
export { factorialDigitSum }
|
||||
|
@ -1,4 +1,4 @@
|
||||
const factorialDigitSum = require('../Problem020')
|
||||
import { factorialDigitSum } from '../Problem020'
|
||||
|
||||
describe('Check Problem 20 - Factorial digit sum', () => {
|
||||
it('Factorial digit sum of 10!', () => {
|
||||
|
Reference in New Issue
Block a user