@thisisvishal
Aspiring full-stack developer 💻🌍 , Technical Writer ✍️
Nothing here yet.
I am available for web developer role
Thankyou !! As per your query let me define again in more simpler terms. Then, In throttling , the function runs only once within given time period (let's say 1 second), no matter how many times user fires event in 1 second, the function will run only once. And function will run second time only after 1 second has been passed. In debouncing , function runs only after a delay of when the user has stopped firing the event (let's say 1 second again). If the user has fired the event again within the 1 second. Then 1 second will be considered from that point. And function will be executed with the new 1 second and previous timing will be cancelled. Suppose user fires event again, then again new time will be generated. And function will execute only after user has stopped firing event. no matter how many times the user fires the event, the attached function will be executed only after the specified time once the user stops firing the event. Hope it helps