const arrow = document.querySelector('.arrow');
const speed = document.querySelector('.seed-value');
navigator.geolocation.watchPosition((data)=>{
consloe.log(data);
speed.textContent = data.coodr.speed;
arrow.style.transform = `rotate(${data.coords.heading}deg)`
},(err)=>{
console.err(err);
alert('HEY!YOU GOTTA ALLOW TO HEPPEN!!')
});
參考資料來源: