diff --git a/BlazorStudy.BootstrapLatest/wwwroot/es6study/ES6Study.js b/BlazorStudy.BootstrapLatest/wwwroot/es6study/ES6Study.js new file mode 100644 index 0000000..2614993 --- /dev/null +++ b/BlazorStudy.BootstrapLatest/wwwroot/es6study/ES6Study.js @@ -0,0 +1,10 @@ +//()()写法:后面括号指的是"立即执行一次前面括号里的代码(不只是函数,全部执行一次)" +(() => { + const f1 = () => { console.log("---- 执行函数 f1 ----"); }; + const f2 = () => { console.log("---- 执行函数 f2 ----"); }; + console.log("====================== ES6学习 ====================="); + f1(); + f2(); + + //其它业务逻辑 +})(); \ No newline at end of file diff --git a/BlazorStudy.BootstrapLatest/wwwroot/es6study/Index.html b/BlazorStudy.BootstrapLatest/wwwroot/es6study/Index.html new file mode 100644 index 0000000..8a47707 --- /dev/null +++ b/BlazorStudy.BootstrapLatest/wwwroot/es6study/Index.html @@ -0,0 +1,41 @@ + + + +
+ + ++//()()写法:后面括号指的是"立即执行一次前面括号里的代码(不只是函数,全部执行一次)" +(() => { + const f1 = () => { console.log("---- 执行函数 f1 ----"); }; + const f2 = () => { console.log("---- 执行函数 f2 ----"); }; + console.log("====================== ES6学习 ====================="); + f1(); + f2(); + + //其它业务逻辑 +})(); ++