Skip to content

Commit fe26771

Browse files
committed
mvp done
1 parent a6021e2 commit fe26771

2 files changed

Lines changed: 10 additions & 2 deletions

File tree

‎assignments/array-methods.js‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,4 +114,9 @@ runnerAfterRefunds = runners.map((runner) => {
114114
};
115115
})
116116
console.log('hello', donateAboveTwoHundred);
117-
// Problem 3
117+
// Problem 3
118+
let onlyEmails = [];
119+
onlyEmails = runners.map(runner => {
120+
return runner.email;
121+
});
122+
console.log(onlyEmails);

‎assignments/closure.js‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,11 @@ const counter = () => {
1717
function increaseNum(){
1818
return a++;
1919
}
20+
increaseNum();
21+
return a;
2022
};
21-
console.log(counter());
23+
const newCounter = counter();
24+
console.log(newCounter);
2225
// Example usage: const newCounter = counter();
2326
// newCounter(); // 1
2427
// newCounter(); // 2

0 commit comments

Comments
 (0)