Farzi Engineer Interview Question

code for debounce and throtelling in javascript.