首页 > 代码库 > es let2

es let2

<!DOCTYPE html>
<html>
    <head>
        <meta charset="UTF-8">
        <title></title>
    </head>
    <body>
        <script src="js/browser.min.js" type="text/javascript" charset="utf-8"></script>
        <script type="text/javascript">
            "use strict"
            function f(){
                let i = 0;
                {
                    let i = 5;
                }
                console.log(i);
            }
            
            f();//0
            
            {{{{{let insane = hello word}}}}}
            
            function ff(){
                console.log(外面);
            }
            (function(){
                if(true){
                    function ff(){
                        console.log(里面);
                    }
                }
                
                ff();    //里面
            })();
            
            {
                let a = aaa;
                function fff(){
                    console.log(a);
                    return a;
                }
            }
            
            //fff();    //报错
            
            let ffff;
            {
                let a = secret;
                ffff = function(){
                    console.log(a);
                    return a;
                }
            }
            ffff();
        </script>
    </body>
</html>

 

es let2