callback.js

function writeCode(callback){
console.log("i am waiting....")
callback();
console.log("i am ready")
}
function prepare(){
console.log("i am preparing...")
}

writeCode(prepare)

posted @ 2015-11-10 17:28  Cynthia娆墨旧染  阅读(142)  评论(0编辑  收藏  举报