Skip to content
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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

leehyewon0531
Copy link
Contributor

No description provided.

Copy link
Contributor

@chaeiJeon chaeiJeon left a 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")
Copy link
Contributor

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]
Copy link
Contributor

Choose a reason for hiding this comment

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

👏👏👏 배워감니다

Copy link
Contributor

Choose a reason for hiding this comment

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

임시 값 없이 바로 교환 할 수 있어서 좋은 것 같아요!

Copy link
Contributor

@yoon-junseo yoon-junseo left a 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]
Copy link
Contributor

Choose a reason for hiding this comment

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

임시 값 없이 바로 교환 할 수 있어서 좋은 것 같아요!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants