We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2d030ab commit 5126073Copy full SHA for 5126073
2665. Counter II/index.js
@@ -0,0 +1,15 @@
1
+const createCounter = (init) => {
2
+ let tempInit = init
3
+ return {
4
+ increment() {
5
+ return (tempInit += 1);
6
+ },
7
+ decrement() {
8
+ return (tempInit -= 1);
9
10
+ reset() {
11
+ tempInit = init;
12
+ return tempInit;
13
14
+ }
15
+}
README.md
@@ -7,7 +7,7 @@
| Create Hello World Function | ✅ |
| Counter | ✅ |
| To Be Or Not To Be | ✅ |
-| Counter II | |
+| Counter II | ✅ |
| Apply Transform Over Each Element in Array | ✅ |
| Filter Elements from Array | ✅ |
| Array Reduce Transformation | ✅ |
0 commit comments