function run2functions() {
firstFunc(secondFunc);
}
function firstFunc(cb) {
setTimeout(() => {
},1000);
cb();
console.log("first one");
}
function secondFunc() {
setTimeout(() => {
console.log("second one");
},1000);
}
run2functions();