Skip to content

Conversation

@chaerin-dev
Copy link
Contributor

[LEVEL1]
소수 찾기
문자열 다루기 기본
문자열 내림차순으로 배치하기
문자열 내 p와 y의 개수
문자열 내 마음대로 정렬하기
나누어 떨어지는 숫자 배열
같은 숫자는 싫어
가운데 글자 가져오기

Copy link
Owner

@codeisneverodd codeisneverodd left a comment

Choose a reason for hiding this comment

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

주석도 꼼꼼히 적어주셨고, 파일명이나 형식 상의 에러도 없는 것으로 보입니다! 고생하셨습니다 👍

Copy link
Owner

Choose a reason for hiding this comment

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

filter에 대한 간략한 설명을 적어주셔서 처음 보시는 분들도 이해하기 좋을 것 같습니다 👍

Copy link
Owner

Choose a reason for hiding this comment

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

24-27 라인이 answer = arr.filter(e => e %divisor === 0) 와 같은 동작을 하지 않을까 의견남겨봅니다!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

그러네요!! filter 메서드가 익숙하지 않아서 떠올리지 못했는데, filter를 사용하면 가독성도 좋고 훨씬 간결한 코드가 되겠네요. 감사합니다!! 👍👍👍

@chaerin-dev chaerin-dev merged commit 10bba3e into main Apr 18, 2022
@chaerin-dev chaerin-dev deleted the chaerin-dev branch April 18, 2022 06:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

3 participants