Can anyone hint me on how to iterate the currencies array using forEach method to get the id and name of the object.
const currencies = [{
id: 'USD', name: 'US Dollars'
}, {
id: 'UGX', name: 'Ugandan Shillings'
}, {
id: 'KES', name: 'Kenyan Shillings'
}, {
id: 'GHS', name: 'Ghanian Cedi'
}, {
id: 'ZAR', name: 'South African Rand'
}];
var populateCurrencies = (currencies)=>{
currencies.forEach(function(id,name){
}
}