<! DOCTYPE html>varA = 100; functionT () {alert (a); varA = 10; } t (); //output is undefined//t () method variable lifting substance://var a = +;//function T () {//var A;//alert (a);//var a = ten;// }//t (); varStatus = "Outher"; functionShowstatus () {varOutstatus =status; varStatus = "Inner"; varInnerstatus =status; functionstatus () {} alert (outstatus); //Output Status method body "function status () {}"alert (innerstatus);//output Inner} showstatus (); //variable Promotion essence: //JS Variable promotion + method promotion. 44th row The status method is promoted, Outstatus = status in status points to a function status, //Instead of a variable, the var status points to the function if the status is promoted to 40 rows. The output is consistent. //var status = "Outher";//function Showstatus () {a////status ();//var outstatus;//var status;//var innerstatus;//status ();//outstatus = status;//status = "inner";//innerstatus = status;//function status () {}//alert (outstatus);//alert (innerstatus);// }//showstatus ();</script>JS variable elevation + method promotion