Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[1주차] 기본/도전 과제 제출 #1

Merged
merged 2 commits into from
Oct 15, 2022
Merged

[1주차] 기본/도전 과제 제출 #1

merged 2 commits into from
Oct 15, 2022

Conversation

onpyeong
Copy link
Contributor

@onpyeong onpyeong commented Oct 6, 2022

SERVER PR


🐕 과제 구현 명세

  • 기본/도전 과제를 구현했습니다.
  • interface SoptMember, Dinner를 만들었고, 짝수명의 멤버가 있다는 가정 하에 2명씩 짝을 지을 수 있도록 구현했습니다.

🐥 이런 점이 새로웠어요 / 어려웠어요

  • 선택형 프로퍼티를 사용할 때 kotlin에서는 타입뒤에 '?' 기호를 붙였는데, 자바스크립트에서는 '?:' 식으로 사용하는 것이 새로웠습니다.
  • 세미나 실습 때 작성한 Member interface와 도전 과제에서 필요한 Member interface명이 같아서 에러가 발생해서 우선 SoptMember로 이름을 변경했는데 다른 방식으로 해결할 수 있는지 궁금해요!

@onpyeong onpyeong self-assigned this Oct 6, 2022
@onpyeong onpyeong changed the title add: 1주차 기본 과제 [1주차] 기본/도전 과제 제출 Oct 6, 2022
Copy link

@kkyu0718 kkyu0718 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

저보다 꼼꼼하게 잘 정리하셨네용,,ㅋㅋㅋㅋㅋ
양도 많았을텐데 수고 많으셨습니당

interface Dinner {
members: SoptMember[];
shuffle: (members: SoptMember[]) => SoptMember[];
organize: (members: SoptMember[]) => void;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

진짜 오늘 일찍 봤는데 arrow function으로 타입지정을 해주신거 보고 궁금증이 생겨서 찾아보고 오다가 코드리뷰가 늦었습니다.. 어떤 궁금증인지 궁금하시다면 꿀팁/자료 아카이빙에 적어놨으니 많관부.!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

확인했습니다! 코틀린 사용할 때 습관이었어요!

organize(array) {
this.shuffle(array);

for (let i = 0; i < this.members.length; i = i + 2) {
Copy link
Member

@m1njae m1njae Oct 7, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for만 보면 무조건 javascript스러운 forEach(), map 무새였는데 수현님 코드보다가
단순반복을 위해 for를 활용해주셨구나~를 깨달았습니다 크크

단순 반복이라면 for( ), 배열을 순회하려면 forEach( ), 배열을 순회 후 새 배열을 얻고 싶다면 map( ) 사용할 것을 권장한다고 하네요!
코드 리뷰 하면서 또 배웠어요ㅎㅅㅎ

Copy link
Member

@m1njae m1njae left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

과제하느라 정말 고생 많이 하셨어요😊

@onpyeong onpyeong merged commit 0c644bf into main Oct 15, 2022
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.

3 participants