Skip to content

Commit ca7a5e8

Browse files
committed
🐛 FIX: code improvements
1 parent f06a49e commit ca7a5e8

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

Project-Euler/Problem022/Problem022.js

-4
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,6 @@ export const getAlphabeticalValue = (name) => {
1717
export const calculateTotalNameScore = (filePath) => {
1818
return new Promise((resolve, reject) => {
1919
fs.readFile(filePath, 'utf8', (err, data) => {
20-
if (err) {
21-
return reject(err)
22-
}
23-
2420
const names = data.replace(/"/g, '').split(',').sort()
2521

2622
const totalScore = names.reduce((total, name, index) => {

0 commit comments

Comments
 (0)