forked from bethrobson/Head-First-JavaScript-Programming
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjustAVar.html
More file actions
28 lines (21 loc) · 436 Bytes
/
justAVar.html
File metadata and controls
28 lines (21 loc) · 436 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Extreme JavaScript Challenge</title>
<script>
var justAVar = "Oh, don't you worry about it, I'm GLOBAL";
function whereAreYou() {
var justAVar = "Just an every day LOCAL";
function inner() {
return justAVar;
}
return inner;
}
var innerFunction = whereAreYou();
var result = innerFunction();
console.log(result);
</script>
</head>
<body> </body>
</html>