Sourav Mandal
Sourav Mandal

@souravcode

7 Tweets 5 reads Oct 07, 2022
🟒 CallBack Function in JavaScript!
A thread...⇩
🟒 What is CallBack Function?
➟ In JavaScript, you can also pass a function as an argument to a function. This function that is passed as an argument inside of another function is called a callback function.
🟒 Why do we need Callback Functions?
➟ Callbacks make sure that a function is not going to run before a task is completed but will run right after the task has been completed.
🟒 The benefit of Callback Function!
➟ The benefit of using a callback function is that you can wait for the result of a previous function call and then execute another function call.
βœ… How to create a Callback!
🟒 Callback as an Arrow Function!
➟ If you prefer, you can also write the same callback function, , which is a newer type of function in JavaScript:
πŸ“’ That's it for this thread. If you found it useful!
Follow me
@souravcode
Hey, I am a Web Developer From India, Helping people learn web development. I Tweet Around. ⇩⇩⇩
🟒 HTML
🟒 CSS
🟒 JavaScript React, & More Tips & Web Development Content.
βœ… Like
⚑Retweet

Loading suggestions...