Allow a function to be called once and only once.
We have previously seen an example where debounce can be used to call a function once and can ignore subsequent calls.
There is a shorthand way to allow a single function call that if you are not interested in the debounce
part of the problem.
|
|
This is cool, right? Ok then, here’s what you do for homework - discover a way to allow calling any given function twice and only twice.