Skip to content

Commit

Permalink
영어가 싫어요
Browse files Browse the repository at this point in the history
  • Loading branch information
dudwns committed May 18, 2023
1 parent d466de0 commit 0b2a5c3
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions Programmers/exam75.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
function solution(numbers) {
const numStr = ["zero", "one", "two", "three", "four", "five", "six", "seven", "eight", "nine"];
var answer = 0;
numStr.forEach((str, index) => {
numbers = numbers.replaceAll(str, index);
});
return Number(numbers);
}

0 comments on commit 0b2a5c3

Please sign in to comment.