Course lesson

Create a Function to Configure setTimeout

JavaScript is full of inconsistent APIs. Wrapping those APIs in functions allows you to have full control over how to configure them and make them more reusable. This lesson walks through wrapping setTimeout in a function that allows you to pass in custom...

Duration
3 min
Access
Free
Transcript
Available

JavaScript is full of inconsistent APIs. Wrapping those APIs in functions allows you to have full control over how to configure them and make them more reusable. This lesson walks through wrapping setTimeout in a function that allows you to pass in custom times and callbacks independently.