ServiceNow Interview Question

Write a throttled function in JavaScript. (LeetCode #2676)