-
Notifications
You must be signed in to change notification settings - Fork 9
[강윤석] 17주차 과제 제출합니다 #106
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
base: main
Are you sure you want to change the base?
[강윤석] 17주차 과제 제출합니다 #106
Conversation
16주차/(P)17677/17677_js_강윤석.js
Outdated
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.
js는 '==' 와 '==='가 다르다는 것을 이번에 찾아보면서 또 배웠네요😊
16주차/(P)17677/17677_js_강윤석.js
Outdated
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.
반복문을 대신해서 reduce함수를 사용하고 이부분에서 string을 2개씩 나누는 거군요!
16주차/(P)17677/17677_js_강윤석.js
Outdated
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.
저는 2개씩 자른 영어문자열을 그냥 배열로 저장하고 모두 비교하는데 이렇게 map을 이용해서 같은 영어문자열은 중복해서 저장하지 않고 영어문자열을 key로 영어문자열의 개수는 value로 저장하는 방법도 좋은거 같습니다!
16주차/(P)81302/81302_js_강윤석.js
Outdated
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.
맨해튼 거리가 2보다 같거나 작은 경우를 각각 나누어서 정해놓고 코드를 짜니 훨씬 깔끔하고 보기 좋아요😊
16주차/(P)81302/81302_js_강윤석.js
Outdated
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.
맨해튼 거리가 1과 2인 경우 좌표가 유효한지 확인하고 1인경우는 바로 false를 리턴, 2인 경우는 위에서 정의했던 dx,dy값들을 이용해서 'X'인지 확인하니 코드가 정말 잘 이해됩니다!
No description provided.