Skip to content

Commit 070718c

Browse files
committed
gave the problems a description
1 parent d72d8fd commit 070718c

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

assignments/closure.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
// ==== Challenge 1: Write your own closure ====
22
// Write a simple closure of your own creation. Keep it simple!
3-
let z = 5;
43
function me(){
5-
let a = 0;
6-
console.log('challenge 1', a + z);
7-
return function mum(){
8-
let b = 1;
9-
return a + b;
4+
let a = 5;
5+
function multiply(){
6+
return a * 10;
107
}
8+
multiply();
119
}
12-
me();
10+
let number = me();
11+
console.log('attention', number);
12+
// console.log('closure', number);
1313
// ==== Challenge 2: Create a counter function ====
1414
const counter = () => {
1515
let a = 1;

0 commit comments

Comments
 (0)