Returns an array of country objects with country codes and names.
The locale to use for formatting the country names.
An array of country objects.
console.log(getCountries('en'));// [// { code: 'AD', name: 'Andorra' },// { code: 'AE', name: 'United Arab Emirates' },// { code: 'AF', name: 'Afghanistan' },// ...// ] Copy
console.log(getCountries('en'));// [// { code: 'AD', name: 'Andorra' },// { code: 'AE', name: 'United Arab Emirates' },// { code: 'AF', name: 'Afghanistan' },// ...// ]
Returns an array of country objects with country codes and names.