Función de elevación en 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();

No puedo entender cómo funciona el levantamiento en este caso y por quéalert("local mysecondmethod"); no se muestra Si alguien me puede mostrar la secuencia sería útil.

Respuestas a la pregunta(2)

Su respuesta a la pregunta