1
JavaScriptBeginner#scope
var is function scoped and hoisted as undefined. let and const are block scoped and stay in the temporal dead zone until initialised. const cannot be reassigned, though object contents can still change.
if (true) { var a = 1; let b = 2; }
console.log(a); // 1
console.log(b); // ReferenceError
const o = { n: 1 };
o.n = 2; // allowed
o = {}; // TypeError