REST Countries API with color theme switcher

Solution retrospective
I have worked on this project with the help of the Youtuber Florin Pop, i have a general idea of what working with api's is, async functions, and embedding in es6.
One question: When you want to display the borders countries(using .borders property) the api gives you back some three letter abbreviation of the full name, how can i turn that into the full name, any help?
Thank you
Please log in to post a comment
Log in with GitHubCommunity feedback
- @VincenzoMarcovecchio
countries = is my res.json() how can i filter from that for each of those alpha 3 code thank you i'm on the tutorials anyway :)...
- @VincenzoMarcovecchio
I'm trying to create a function i know i'm really bad at it :)
const borders = country.borders; const fullName = for(let border of borders){ let name = border.name //i know this is wrong return name });
- @umutbozdag
You have to fetch those letters from api like this: https://restcountries.eu/rest/v2/alpha/COL and then get the actual names of those countries
Join our Discord community
Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!
Join our Discord