Advertisement
Guest User

Untitled

a guest
Jan 25th, 2021
128
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.     let city =
  4.     {
  5.         name: name,
  6.         area: area,
  7.         population: population,
  8.         country: country,
  9.         postCode: postCode
  10.     };
  11.     let output = '';
  12.     for(let key in city)
  13.     {
  14.         output += `${key} -> ${city[key]}\n`;
  15.     }
  16.     return output;    
  17. }
  18.  
  19. console.log(solve("Sofia"," 492", "1238438", "Bulgaria", "1000"));
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement