Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 2c273ba

Browse files
committed
Use ESM syntax and remove console.log()
1 parent 697c840 commit 2c273ba

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

‎Project-Euler/Problem020.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,4 @@ const factorialDigitSum = (n = 100) => {
3333
return digits.reduce((prev, current) => prev + current, 0)
3434
}
3535

36-
console.log('Factorial digit sum of 100! :', factorialDigitSum())
37-
38-
module.exports = factorialDigitSum
36+
export { factorialDigitSum }

‎Project-Euler/test/Problem020.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
constfactorialDigitSum =require('../Problem020')
1+
import{factorialDigitSum }from'../Problem020'
22

33
describe('Check Problem 20 - Factorial digit sum', () => {
44
it('Factorial digit sum of 10!', () => {

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /