Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function towns(arr) {
- let townData = {};
- for (let row of arr) {
- let [town, latitude, longitude] = row.split(' | ');
- townData.town = town;
- townData.latitude = Number(latitude).toFixed(2);
- townData.longitude = Number(longitude).toFixed(2);
- console.log(townData);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement