Farzi Engineer interview question

code for debounce and throtelling in javascript.