📜  settimeout 后的 js - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:03:22.599000             🧑  作者: Mango

代码示例4
function doHomeWork(subject, callback){
    setTimeout(callback,500);
    console.log("doing my homework:", subject)
}

doHomeWork("Maths", function(){console.log("finished my homework");});