Jessica | Javascript🚀
Jessica | Javascript🚀

@jesss_codes

5 Tweets 21 reads Jun 10, 2021
Callbacks in JavaScript Explained.
Thread 🧵
#100DaysOfCode
A callback is a function passed as an argument to another function
This technique allows a function to call another function
A callback function can run after another function has finished
Synchronous Callback
The Code executes sequentially from top to Bottom, without showing an exception.
Asynchronous Callback
When to Use a Callback?
Where callbacks really shine is in asynchronous functions, where one function has to wait for another function (like waiting for a file to load).

Loading suggestions...