//callback coding challenge II
const country = [
{'name': 'China', 'City': 'Beijing'},
{'name': 'USA', 'City': 'Washington D.C'},
{'name': 'Nigeria', 'City': 'Lagos'}
]
function Country () {
setTimeout(()=>{
let result =''
country.forEach((nation)=>{
result+= `<table> <tr> <td><li> ${nation.name} </li>
<td> <li> ${nation.City} </li> </tr></td></table>
`
})
document.getElementById('show').innerHTML = result
}, 1000
)
}
//use call back function to push a new country and city to the browser
//with 3 seconds wait time.