In JavaScript, a variable can be declared after it has been used.
In other words; a variable can be used before it has been declared.
JavaScript only hoists declarations, not initializations.
Loading
In JavaScript, a variable can be declared after it has been used.
In other words; a variable can be used before it has been declared.
JavaScript only hoists declarations, not initializations.