-
Notifications
You must be signed in to change notification settings - Fork 10
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
GDSC SKHU Web - 전유진 #3
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.
assignment.js
Outdated
document.getElementById('display').value += char; | ||
} | ||
|
||
if(isNaN(char)==true) { |
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(isNaN(char)==true) { | |
if(Number.isNaN(char)==true) { |
isNaN의 경우 아래 링크에서 Number.isNaN
으로 바꾸는 것을 권장하고 있어요!
확인해 보시면 좋을 듯 합니다 ~
https://developer.mozilla.org/ko/docs/Web/JavaScript/Reference/Global_Objects/isNaN
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.
혹시 Number.isNaN으로 바꾸는 경우 연산기호가 연달아 나오게 되는데 어떻게 해결할 수 있나요?
assignment.js
Outdated
document.getElementById('display').value += char; | ||
} | ||
} else { // 이전에 숫자 입력시 | ||
document.getElementById('display').value += char; |
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 depth가 깊어진다면 clean code에서 흔히 말하곤 하는 early return 을 생각해 보시는 것을 추천드려요
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.
감사합니다. 한 번 시도해볼게요!
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.
유진님 ./전유진/assignment.css
처럼 폴더 안에 넣어주셔야 돼요~
이렇게 PR을 올린 후에 변화가 있을 때는, 다시 브랜치를 만드는 게 아니라 PR을 올린 브랜치에 다시 커밋하면 변경 사항이 적용 됩니다 ! @yuj2n |
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.
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.
죄송해용 제가 2000원 내겠습니당 ㅋㅋㅋㅋㅋ
Description
Important content
Reference
후에 직접 획기적인 코드를 작성할 수 있으면 좋겠음.