Web APIs (navigator, geolocation, history)

What is the purpose of the clearWatch() method in this code?
let watchId;

function startTracking() {
  if (navigator.geolocation) {
    watchId = navigator.geolocation.watchPosition(updatePosition, handleError);
  }
}

function stopTracking() {
  if (watchId) {
    navigator.geolocation.clearWatch(watchId);
    watchId = null;
  }
}
Next Question (8/40)