Learn JavaScript CALLBACKS in 7 minutes! 🤙
48 هزار بار بازدید -
10 ماه پیش
-
00:00:00
00:00:00 introduction
00:00:50 example 1
00:04:00 example 2
// callback = a function that is passed as an argument
// to another function.
// used to handle asynchronous operations:
// 1. Reading a file
// 2. Network requests
// 3. Interacting with databases
// "Hey, when you're done, call this next."
hello(goodbye);
function hello(callback){
console.log("Hello!");
callback();
}
function goodbye(){
console.log("Goodbye!");
}
00:00:50 example 1
00:04:00 example 2
// callback = a function that is passed as an argument
// to another function.
// used to handle asynchronous operations:
// 1. Reading a file
// 2. Network requests
// 3. Interacting with databases
// "Hey, when you're done, call this next."
hello(goodbye);
function hello(callback){
console.log("Hello!");
callback();
}
function goodbye(){
console.log("Goodbye!");
}
10 ماه پیش
در تاریخ 1402/08/17 منتشر شده
است.
48,036
بـار بازدید شده