You need Login/Signup to run/submit the code.
Implement a function that accepts a callback and restricts its invocation to at most once | Lodash Polyfills | Frontend Problem Solving
In this question, you need to create a function that accepts a
callback and restricts its invocation to at most once.
Repeat calls to the function return the value of the first invocation. The
callback is invoked with the
this binding and arguments of the created function.
callback (Function): The function to restrict.
(Function): Returns the new restricted function.
Start the timer, complete your solution, test your solution against the test cases provided by the platform, and submit it. Ideally, you should finish this question within 30 mins.