Skip to content

Commit 6ffa0cc

Browse files
committed
MVP - Task 4: Closures
1 parent 82da08d commit 6ffa0cc

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ We have learned that closures allow us to access values in scope that have alrea
4444

4545
**Hint: Utilize debugger statements in your code in combination with your developer tools to easily identify closure values.**
4646

47-
* [ ] Review the contents of the [closure.js](assignments/closure.js) file.
48-
* [ ] Complete the problems provided to you but skip over stretch problems until you are complete with every other JS file first.
47+
* [x] Review the contents of the [closure.js](assignments/closure.js) file.
48+
* [x] Complete the problems provided to you but skip over stretch problems until you are complete with every other JS file first.
4949

5050
## Stretch Goals
5151

assignments/closure.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
// ==== Challenge 1: Write your own closure ====
22
// Write a simple closure of your own creation. Keep it simple!
3+
let tracker = 0;
34

5+
function add() {
6+
tracker += 1;
7+
}
8+
add();
49

510
/* STRETCH PROBLEMS, Do not attempt until you have completed all previous tasks for today's project files */
611

0 commit comments

Comments
 (0)