0

In Global Execution the declaration of var and regular function is executed on the top. But I don't understand how the execution happened to let, const & and arrow functions when are declared Globally.

I have searched on many plateforms about how execution happened to let, const & arrow function but couldn;t anything relevant.

  • `const` and `let` variables are [hoisted](https://developer.mozilla.org/en-US/docs/Glossary/Hoisting) as well if that's what you ask – Konrad Jan 12 '23 at 18:40
  • 2
    `const` and `let` work in the global scope just as they do in a function scope, just like `var` and `function` declarations – Bergi Jan 12 '23 at 21:08

0 Answers0