main
parent
12692264a8
commit
381ed546a7
@ -1,41 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh-cn">
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>ES6 学习</title>
|
||||
<link rel="icon" type="image/png" href="/favicon.ico" />
|
||||
<link rel="stylesheet" href="../bootstrap/css/bootstrap.min.css" />
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="container">
|
||||
<div class="card my-4">
|
||||
<div class="card-header text-bg-success">
|
||||
ES6学习:请在开发者工具里查看日志输出
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div id="ES6_div">
|
||||
<pre>
|
||||
//()()写法:后面括号指的是"立即执行一次前面括号里的代码(不只是函数,全部执行一次)"
|
||||
(() => {
|
||||
const f1 = () => { console.log("---- 执行函数 f1 ----"); };
|
||||
const f2 = () => { console.log("---- 执行函数 f2 ----"); };
|
||||
console.log("====================== ES6学习 =====================");
|
||||
f1();
|
||||
f2();
|
||||
|
||||
//其它业务逻辑
|
||||
})();
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script src="../bootstrap/js/bootstrap.bundle.min.js"></script>
|
||||
<script src="./ES6Study.js"></script>
|
||||
</body>
|
||||
|
||||
</html>
|
Loading…
Reference in New Issue