Can someone help on how to push all object values into one array please?
const countryObject = data.countryBorders
for ( var i = 0; i < countryObject.length; i++ ) {
let countries = []
let country = countryObject[i].properties.name
countries.push(country)
console.log(contries)
it print
["Bahamas"]["Canada"]["Costa Rica"]["Cuba"]...
but I need it to print in one array under countries variable like
["Bahamas", "Canada", "Costa Rica", "Cuba"]