Authored By: Sanjeet Tripathi
In all the cases, the Callback function is used as the parameter in the primary function.
Why do we need Callback Function?
Data fetched from Array
Data Fetched from Array
Now we can see that Function B is executed later despite the Asynchronous run of Function A. This is how the callback function works. It is mostly used when you are fetching data from Database.
What is YourEngineer?
YourEngineer is the first Engineering Community Worldwide that focuses on spreading Awareness, providing Collaboration and building a focused Career Approach for Engineering Students.