High Definition Standard Definition Theater
Video id : ChGI4et1wJ0
ImmersiveAmbientModecolor: #af9c90 (color 2)
Video Format : (720p) openh264 ( https://github.com/cisco/openh264) mp4a.40.2 | 44100Hz
Audio Format: 140 ( High )
PokeTubeEncryptID: e728c28a96e0671979859ec592821c32ba0d987141c98b78cf0bd9689a7c1268e2d532db672814b7d253a375011680b8
Proxy : usa-proxy2.poketube.fun - refresh the page to change the proxy location
Date : 1727205304780 - unknown on Apple WebKit
Mystery text : Q2hHSTRldDF3SjAgaSAgbG92ICB1IHVzYS1wcm94eTIucG9rZXR1YmUuZnVu
143 : true
How to delay a function call using a #javascript debounce
Jump to Connections
2,659 Views β€’ Feb 1, 2024 β€’ Click to toggle off description
Writing your own debounce function always seemed a bit complicated, scary and un-necessary to me until I discovered this simple way to write one.

Essentially you just write another function which takes the function you want to debounce as an argument and the delay time.

Then you just return another function from the debounce function and set a timeout to call the actual function you want to call (with the delay as passed in as the argument).

You can then clear the timeout reference if the debounce function has been called again which will stop the previous execution of the function as the timeout hasn't expired yet and restart the timer again.

This way, the function you pass in as the callback function only gets called once the delay time has expired and the debounce function hasn't been called again during that time.
Metadata And Engagement

Views : 2,659
Genre:
Uploaded At Feb 1, 2024 ^^


warning: returnyoutubedislikes may not be accurate, this is just an estiment ehe :3
Rating : 4.948 (1/76 LTDR)

98.70% of the users lieked the video!!
1.30% of the users dislieked the video!!
User score: 98.05- Masterpiece Video

RYD date created : 2024-09-08T13:47:32.774328Z
See in json
Tags
Connections
Nyo connections found on the description ;_; report an issue lol

YouTube Comments - 4 Comments

Top Comments of this video!! :3

@starman7475

5 months ago

or use lodash library))

1 |

Go To Top