210k views
4 votes
Im doing a project on javascript to let the user enter a country and get its capital as a result. However, i cant enter all countries as there are too much of them.

Any idea on how to put every country and its capital in my code?

User Gowtham
by
8.1k points

1 Answer

4 votes

I recommend using a package. Look up "world-countries-capitals npm" on google, and they will give you a neat tutorial on how to implement that into your program. Good luck.

User Daniel Messner
by
7.8k points