Let us understand what precisely this is:
This is the following sequence mostly in which variable declaration and initialization occur.
1. Declaration -> 2.Initialisation/Assignment ->3. Usage
Explanation of the program
In the above program we created two functions called "codeHoist();"and "fun();" using the function keyword. In the definition of the "codeHoist()," we have declared variable "b" using let Keyword and also assigned the value as 50. We have another variable, "a" that we left undeclared and assigned value 11 to it.
Inside the definition of the "fun()," function, we simply printed the value of both variables.