回调一般都和异步一起进行。
function map(git){
setTimeout(function(){
git("你的号码是")
},1000)
}
//拿东西的函数,并输出也叫回调。
function gitEvent(wrap){
console.log(wrap)
}
map(gitEvent)
//用另一个函数去拿一个函数里面的东西,并用另一个函数输出出来。
function map(git){
setTimeout(function(){
git("你的号码是")
},1000)
}
//拿东西的函数,并输出也叫回调。
function gitEvent(wrap){
console.log(wrap)
}
map(gitEvent)
//用另一个函数去拿一个函数里面的东西,并用另一个函数输出出来。
本文标题:回调
本文链接:https://www.haomeiwen.com/subject/zqrayxtx.html
网友评论