const are commonly considered as not hoisted due to their different behavior.
const differ in their initialization.
function are initialized as
const stay uninitialized (Temporal Dead Zone) until its statement is evaluated. That’s why a you get a
ReferenceError when trying to access it before they are declared.