Skip to content

Commit 2c410cc

Browse files
committed
closure.js done
1 parent 7b845bc commit 2c410cc

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

‎assignments/closure.js‎

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
// ==== Challenge 1: Write your own closure ====
22
// Write a simple closure of your own creation. Keep it simple!
3-
3+
let count = 28;
4+
function countMe() {
5+
let total= 100;
6+
total += count;
7+
console.log(total);
8+
}
9+
countMe();
410

511
// ==== Challenge 2: Create a counter function ====
612
const counter = () => {

0 commit comments

Comments
 (0)