Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Describe your changes
사실 처음 문제를 만났을 때, 이게 뭐가 문제이지..? 라고 생각하긴 했습니다.
그래서 가장 먼저 한 생각이, reduce 쓰면 되지 않을까? 라는 생각이었고 for문을 reduce로 바꿔서 내장 메소드로 한 번 추상화를 했습니다.
그리고 reduce의 콜백함수를 선언하기 보다는 별도의 순수 함수를 따로 만들어서 추상화를 한 번 더 했습니다.
💬 질문 사항이에요
🤷♂️ 확인 받고 싶은 부분이에요
🔥 이건 꼭 확인해주세요