Can var declaration also go override another functions let declaration?

const call = () => {
  var a = 2;

console.log(a);
}

const call2 = () => {
  let a = 1;

console.log(a);
}

call(); -> 2
call2(); -> 1

IS this correct? Var cannot also go across the other functions right?
Was this page helpful?