silvana1303

city

Apr 9th, 2021
1,025
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function solve(name, area, population, country, postcode){
  2.  
  3.     //name, area, population, country and postcode.
  4.  
  5.     let city = {
  6.         name: name,
  7.         area: area,
  8.         population: population,
  9.         country: country,
  10.         postCode: postcode
  11.     };
  12.  
  13.  
  14.  
  15.     for (let key in city) {
  16.         console.log(`${key} -> ${city[key]}`)
  17.     }
  18.  
  19. }
Advertisement
Add Comment
Please, Sign In to add comment