function a() { setTimeout(function() { console.log("hi") }, 5000) } function b() { console.log("hello"); } a(); b();
function a(callback) { setTimeout(function() { console.log("hi"); callback(); }, 5000) } function b() { console.log("hello"); } a(b);
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)