mirror of
https://github.com/TheAlgorithms/JavaScript.git
synced 2025-07-05 16:26:47 +08:00
Use ESM syntax and remove console.log()
This commit is contained in:
@ -40,6 +40,4 @@ const powerDigitSum = function (n = 2, pow = 1000) {
|
|||||||
return digits.reduce((prev, current) => prev + current, 0)
|
return digits.reduce((prev, current) => prev + current, 0)
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log('Power digit sum of 2^1000 :', powerDigitSum())
|
export { powerDigitSum }
|
||||||
|
|
||||||
module.exports = powerDigitSum
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
const powerDigitSum = require('../Problem016')
|
import { powerDigitSum } from '../Problem016'
|
||||||
|
|
||||||
describe('Check Problem 16 - Power digit sum', () => {
|
describe('Check Problem 16 - Power digit sum', () => {
|
||||||
it('Power digit sum of 2^15', () => {
|
it('Power digit sum of 2^15', () => {
|
||||||
|
Reference in New Issue
Block a user