Skip to content

Commit 8c166cf

Browse files
committed
solves Challenge-1 in closure.js
1 parent 314fe98 commit 8c166cf

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

assignments/closure.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
// ==== Challenge 1: Write your own closure ====
22
// Write a simple closure of your own creation. Keep it simple!
3+
let villain = "Verbal Kint";
4+
let villainDeclarer = () => console.log(`I am ${villain}`);
5+
villainDeclarer();
6+
villain = "Keyser Soze";
7+
villainDeclarer();
38

49

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

0 commit comments

Comments
 (0)