Hoisting

by Trae

JavaScript

someOtherFunction("test");
someFunction("test"); // this will fail


var someFunction = function(text){
    alert(text);
}

function someOtherFunction(text){
    alert(text);
}