-
-
Notifications
You must be signed in to change notification settings - Fork 195
[나리] WEEK04 Solutions #424
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
고생하셨습니다
if (answer.join("") === answer.reverse().join("")) { | ||
return true; | ||
} | ||
return false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
이렇게 작성할 수도 있겠네요!
if (answer.join("") === answer.reverse().join("")) { | |
return true; | |
} | |
return false; | |
return answer.join("") === answer.reverse().join("")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
이게 더 간단하겠네요! 👍
let trimmed = s.toLowerCase(); | ||
let answer = []; | ||
let checkAlphabet = /[a-zA-Z]/; | ||
let checkNum = /[0-9]/; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 키워드로 선언하는 것을 추천합니다!
가독성과 이후 의도지 않은 버그 발생 여지 사단 차단한다는 점에서 장점을 가지고 있어요!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
이전 로직에서 재할당하려고 let으로 작성했는데 바꾸는걸 까먹었군요 ㅎㅎ 감사합니다!
답안 제출 문제
이번주는 개인적인 일정으로 두 문제만 풀겠습니다.
체크 리스트
In Review
로 설정해주세요.