Skip to content

6회차 스터디 후 src/utils 풀이#10

Draft
wogha95 wants to merge 4 commits intomainfrom
max/src/utils
Draft

6회차 스터디 후 src/utils 풀이#10
wogha95 wants to merge 4 commits intomainfrom
max/src/utils

Conversation

@wogha95
Copy link
Member

@wogha95 wogha95 commented Jan 12, 2024

TL;DR

  • groupBy.test.js
  • unique.test.js
  • lib.js

Description

  • groupBy.test.js
    • 각 callback의 type과 arr의 type을 활용하여 각 test에 통과하도록 하였습니다. -> 개선이 필요해 보임
    • reduce를 이용하여 결과물을 생성할 수 있도록 하였습니다.
    • 항상 객체를 결과값으로 가지고 있기 때문에 객체에 추가하는 함수를 분리하였습니다.
  • unique.test.js
    • reduce를 이용하여 결과물을 생성할 수 있도록 하였습니다.
    • 각 요소의 기록이 필요해서 reduce의 초기값, 이전값을 결과물과 기록할 수 있는 요소를 갖도록 하였습니다.
  • lib.js
    • 보류

@wogha95 wogha95 self-assigned this Jan 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

Comments