Advertisement
bebo231312312321

Untitled

Feb 25th, 2023
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.29 KB | None | 0 0
  1. function towns(input){
  2. let obj = {}
  3. for(let lines of input){
  4. let line = lines.split(" | ");
  5.  
  6. obj.name= line[0],
  7. obj.latitude =Number(line[1]).toFixed(2),
  8. obj.longitude =Number(line[2]).toFixed(2)
  9.  
  10. console.log(obj)
  11. }
  12.  
  13.  
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement