Hoisting with fns

Hoisting :

Moving the functions and variables to the top of their respective scope. It doesn't works on Function expression and Arrow functions. You might wonder why it wouldn't work?

It's because the function expression would be defined as

var x=function(){

//your code

}

since the assignment is to a variable function, during the memory allocation phase , it'll be assigned as undefined. Hence these 2 kinds of functions can't be accessed.