Ian• 310
@ianbuen
Submitted
@diffim
@ianbuen
Submitted
@diffim
Posted
bro great job i already finished my challenge but looking at ur code i got some inspiration to do better, like destructuring objects more and using stuff like getNativeName() instead of just having that logic scattered all over the place as consts
@Djarma12
Submitted
This challenge was very interesting, the problem was that it took me a long time to solve each problem, but in the end I succeeded.
I will appear any suggestions on how to solve this.
Any suggestions is highly welcome!
@diffim
Posted
hey i noticed that the countries at first werent alphabetically ordered a way you can do this is by sorting the allcountries object with this
.sort(function (a, b) {
if (a.name.common < b.name.common) {
return -1;
}
if (a.name.common > b.name.common) {
return 1;
}
return 0;
});