-
Notifications
You must be signed in to change notification settings - Fork 2
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
[혜원] 4-ExchangeRate #19
base: main
Are you sure you want to change the base?
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.
수고하셨습니다 ~~><
const firstCountry = $firstSelect.options[$firstSelect.selectedIndex].value | ||
const secondCountry = $secondSelect.options[$secondSelect.selectedIndex].value | ||
|
||
fetch("https://v6.exchangerate-api.com/v6/0c8fbd2c3ca43caf99612cff/latest/USD") |
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.
/latest/${firstCountry} 로 데이터를 불러와서 사용하면 16번 줄에서
(response.conversion_rates[secondCountry]) / (response.conversion_rates[firstCountry]) 를 response.conversion_rates[secondCountry] 이렇게 줄일 수 있을 것 같아요!
const secIndex = $secondSelect.selectedIndex | ||
$firstSelect.options[secIndex].selected = true | ||
$secondSelect.options[firIndex].selected = true | ||
[$firstSelect, $secondSelect] = [$secondSelect, $firstSelect] |
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.
임시 값 없이 바로 교환 할 수 있어서 좋은 것 같아요!
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.
수고하셨습니다!
const secIndex = $secondSelect.selectedIndex | ||
$firstSelect.options[secIndex].selected = true | ||
$secondSelect.options[firIndex].selected = true | ||
[$firstSelect, $secondSelect] = [$secondSelect, $firstSelect] |
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.
임시 값 없이 바로 교환 할 수 있어서 좋은 것 같아요!
No description provided.