I'm trying to make an array of coordinate arrays, but I'm blanking out on how to doing. How do I make this happen?
Code -
targetLocations() {
const data = []
const timer = setInterval(() => {
for (let i = 0; i<store.state.location.locations.length; i++) {
const coordinates = [store.state.location.locations[i]["longitude"]+","+store.state.location.locations[i]["latitude"]]
data.push(coordinates)
console.log("this is the data "+data)
}
}, 1000);
},
I've tried making coordinates an array and it still didn't work
Via Active questions tagged javascript - Stack Overflow https://ift.tt/5hpkbGf
Comments
Post a Comment