We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 552cca4 commit ffade6bCopy full SHA for ffade6b
Project-Euler/Problem022.js
@@ -15,7 +15,7 @@
15
*/
16
17
export function namesScores (namesTxt) {
18
- namesTxt = namesTxt.replaceAll('"', '')
+ namesTxt = namesTxt.replaceAll(/"|\n/g, '')
19
const names = namesTxt.split(',')
20
21
names.sort((a, b) => (a > b) - (a < b))
0 commit comments