Curriculum
Course: JavaScript Basic
Login

Curriculum

JavaScript Basic

JSHome

0/216
Text lesson

When to Use a Callback?

The examples above are basic and simplified to demonstrate the callback syntax.

Callbacks are especially powerful in asynchronous functions, where one function must wait for another to complete (such as waiting for a file to load).

Asynchronous functions will be covered in the next chapter.