How to output variable values from addeventlistener [duplicate]

let xc = null;
let yc = null;
var el = document.getElementById("canvas");

el.addEventListener('mousemove', function(f) {
  console.log('Coordinates: x=' + f.clientX + ' y=' + f.clientY);
  xc = f.clientX;
  yc = f.clientY;
  return xc;
  return yc;
})

console.log(xc, yc);

As a result, when you touch the screen, the coordinates are shown, but are not updated separately via console.log