Create a Function to Configure setTimeout

Share this video with your friends

Send Tweet

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.