Way 12-1- defined functions

<! DOCTYPE HTML > 
< HTML lang = "EN" > 
< head > 
    < Meta charset = "UTF-. 8" > 
    < title > the Title </ title > 
</ head > 
< body > 
< Script > 

    // function can be bracketed since the implementation of 


    // the let A = function () { 
    //      Alert (. 1); 
    // }; 
    // A (); 

    // only functions to perform parentheses 
    // the let-10 A = VUE-Router; 
    // A ();// error 

    //This is possible, the browser will first parse 
    // A (); 
    // function A () { 
    //      Alert (. 1); 
    // } 

    // This is not a 
    // A (); 
    // the let A function = () { 
    //      Alert (. 1); 
    // } 

    the let a =  function B () { 
        Alert ( . 1 ); 
    }; 
    // a call is outside 
    // not be used outside B 
    // B may be used within a function 
    // inside a and b are the same as 
</ Script > 
</ body > 
</ HTML >

 

Guess you like

Origin www.cnblogs.com/zhangyu666/p/11479659.html