Here is Pseudo-code of jQuery
$(document).ready(function(){
printHelloworld();
});
var printHelloworld = function(){
console.log('hello world');
}
In this sample, the console will print hello world.
My question is that Function expression must be assigned before usage, but in this sample, I used the printHelloworld() before assigned it. I do not know what have .ready() function done? Did it do something to hoist the function?