Skip to content

Conversation

naringst
Copy link
Contributor

@naringst naringst commented Sep 4, 2024

답안 제출 문제

체크 리스트

  • PR을 프로젝트에 추가하고 Week를 현재 주차로 설정해주세요.
  • 바로 앞에 PR을 열어주신 분을 코드 검토자로 지정해주세요.
  • 문제를 모두 푸시면 프로젝트에서 Status를 In Review로 설정해주세요.
  • 코드 검토자 1분 이상으로부터 승인을 받으셨다면 PR을 병합해주세요.

@naringst naringst self-assigned this Sep 4, 2024
@github-actions github-actions bot added the js label Sep 4, 2024
@naringst naringst requested review from JEONGHWANMIN and Sunjae95 and removed request for JEONGHWANMIN September 4, 2024 14:41
@naringst naringst marked this pull request as ready for review September 7, 2024 03:22
@naringst naringst requested a review from a team as a code owner September 7, 2024 03:22
Copy link
Member

@sounmind sounmind left a comment

Choose a reason for hiding this comment

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

고생하셨습니다☺️

Comment on lines +25 to +28
if (answer.join("") === answer.reverse().join("")) {
return true;
}
return false;
Copy link
Member

Choose a reason for hiding this comment

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

이렇게 작성할 수도 있겠네요!

Suggested change
if (answer.join("") === answer.reverse().join("")) {
return true;
}
return false;
return answer.join("") === answer.reverse().join(""))

Copy link
Contributor Author

Choose a reason for hiding this comment

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

이게 더 간단하겠네요! 👍

Comment on lines +14 to +17
let trimmed = s.toLowerCase();
let answer = [];
let checkAlphabet = /[a-zA-Z]/;
let checkNum = /[0-9]/;
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
let trimmed = s.toLowerCase();
let answer = [];
let checkAlphabet = /[a-zA-Z]/;
let checkNum = /[0-9]/;
const trimmed = s.toLowerCase();
const answer = [];
const checkAlphabet = /[a-zA-Z]/;
const checkNum = /[0-9]/;

재할당되지 않은 변수를 const 키워드로 선언하는 것을 추천합니다!
가독성과 이후 의도지 않은 버그 발생 여지 사단 차단한다는 점에서 장점을 가지고 있어요!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

이전 로직에서 재할당하려고 let으로 작성했는데 바꾸는걸 까먹었군요 ㅎㅎ 감사합니다!

@SamTheKorean SamTheKorean merged commit 2bcb30a into DaleStudy:main Sep 8, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
No open projects
Status: Completed
Development

Successfully merging this pull request may close these issues.

3 participants