문제Write a function createCounter. It should accept an initial integer init. It should return an object with three functions.The three functions are:increment() increases the current value by 1 and then returns it.decrement() reduces the current value by 1 and then returns it.reset() sets the current value to init and then returns it.출력 예시Example 1:Input: init = 5, calls = ["increment","reset","d..
Coding/JS
문제Write a function expect that helps developers test their code. It should take in any value val and return an object with the following two functions.toBe(val) accepts another value and returns true if the two values === each other. If they are not equal, it should throw an error "Not Equal".notToBe(val) accepts another value and returns true if the two values !== each other. If they are equal,..