Funkcja podnoszenia w js

function mymethod(){
  alert("global mymethod");
}

function mysecondmethod(){
  alert("global mysecondmethod");
}

function hoisting(){
  alert(typeof mymethod);
  alert(typeof mysecondmethod);

  mymethod();         // local mymethod
  mysecondmethod(); // TypeError: undefined is not a function

  // mymethod AND the implementation get hoisted
  function mymethod(){
    alert("local mymethod");  
}

// Only the variable mysecondmethod get's hoisted
var mysecondmethod = function() {
    alert("local mysecondmethod");  
};
}
hoisting();

Nie jestem w stanie zrozumieć, jak działa podnośnik w tym przypadku i dlaczegoalert("local mysecondmethod"); nie jest pokazany. Gdyby ktoś mógł mi pokazać sekwencję, byłoby to pomocne

questionAnswers(2)

yourAnswerToTheQuestion