I am taking this challenge, https://www.frontendmentor.io/challenges/rest-countries-api-with-color-theme-switcher-5cacc469fec04111f7b848ca I am getting stuck that one requirement is to click the border name to get the detail of that country.
This is my code, https://github.com/xnslx/fetchAPI I need some help. (I havenβt done any css styling yet)
Merry Christmas!
Top comments (3)
Amazing buddy. What a great way to spend christmass :)
Anyways,
I had a quick look at your js code and the countries API. You seem to be on the right track.
If you take a look again at the API, each object has a field called 'cioc'. Which is the short name of the country. These are the same names used in the borders field in each object. So all you need to do is take the value of the border button, pass it to a search function that gets you the country by its "cioc", then display it.
I am not gonna give you anymore hints coz I can see that you can easily do it.
Good luck!
Hey, thank you for replying to me. I have been got stuck for nearly a week without coming up a solution. I need some hints based on my code. Happy holiday!
-Xian
I'm stuck at the same place as you. Thanks for posting for help here. I'm glad to get this.