leetcode 30 days js challenge
Easy
Given a function fn
, return a new function that is identical to the original function except that it ensures fn
is called at most once.
fn
.undefined
.Example 1:
Example 2:
Constraints:
1 <= calls.length <= 10
1 <= calls[i].length <= 100
2 <= JSON.stringify(calls).length <= 1000
SheepFri, May 12, 2023