We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
// this is not working while i try to repeat function with different country name
const html = ` <article class="country"> <img class="country__img" src="${data.flag}" /> <div class="country__data"> <h3 class="country__name">${data.name}</h3> <h4 class="country__region">${data.region}</h4> <p class="country__row"><span>👫</span>${( +data.population / 1000000 ).toFixed(1)} people</p> <p class="country__row"><span>🗣️</span>${data.languages[0].name}</p> <p class="country__row"><span>💰</span>${data.currencies[0].name}</p> </div> </article> `;
// so i try this and worked
const countryHtml = ` <article class="country"> <img class="country__img" src="${data.flags.png}" /> <div class="country__data"> <h3 class="country__name">${data.name.common}</h3> <h4 class="country__region">${data.region}</h4> <p class="country__row"><span>👫</span>${( +data.population / 1000_000 ).toFixed(1)}</p> <p class="country__row"><span>🗣️</span>${Object.values(data.languages)[0]}</p> <p class="country__row"><span>💰</span>${Object.values(data.currencies)[0].name}</p> </div> </article>`;
The text was updated successfully, but these errors were encountered:
Thanks @fatemeh-lohrasbi this helped alot
Sorry, something went wrong.
Thanks
No branches or pull requests
// this is not working while i try to repeat function with different country name
// so i try this and worked
The text was updated successfully, but these errors were encountered: