Skip to content

Commit ffdb176

Browse files
committed
20170727
1 parent 0feff85 commit ffdb176

File tree

2 files changed

+25
-0
lines changed

2 files changed

+25
-0
lines changed

WEEK1/DAY3/1-scope.html

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<meta charset="UTF-8">
5+
<title>作用域</title>
6+
</head>
7+
<body>
8+
<script>
9+
var num = 12;
10+
function fn() {
11+
var num = 13;
12+
return function () {
13+
console.log(num);
14+
}
15+
}
16+
var f = fn();
17+
f();
18+
function sum() {
19+
var num = 14;
20+
f();
21+
}
22+
sum();
23+
</script>
24+
</body>
25+
</html>

WEEK1/DAY3/1.png

80.5 KB
Loading

0 commit comments

Comments
 (0)