...
/Solution Review: Asynchronous Callback Functions
Solution Review: Asynchronous Callback Functions
This lesson will explain the solution to the problem in the previous lesson.
We'll cover the following...
We'll cover the following...
Solution #
Explanation #
Before we discuss the solution above, let’s discuss what the original code was doing.
The getTodo function has the setTimeout function which returns the object {text : 'Complete Code Example'} after two seconds pass.
In the display function, we call the getTodo function and save the result in the variable todo. Finally, we display the ...