Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
const id = 21;
const callback = function(data1){
//1. callback fonksiyon gövdesi
console.log(data)
//asenkron kod
getData(22, function(data2){
//2. callback fonksiyon gövdesi
console.log(data,data2)
getData(23, function(data3){
//3. callback fonksiyon gövdesi
console.log(data,data3)
getData(24, function(data4){
//4. callback fonksiyon gövdesi
console.log(data,data4)
getData(25, function(data5){
//5. callback fonksiyon gövdesi
console.log(data,data5)
getData(26, function(data6){
//...
});
});
});
});
});
};
getData(id, callback);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment