📅  最后修改于: 2022-03-11 15:02:55.958000             🧑  作者: Mango
const printProcess = () => {
console.log('it will print 2nd');
var currentTime = new Date().getTime();
while (currentTime + 3000 >= new Date().getTime());
console.log('it will print after added 3 second with current time')
}
console.log('it will print 1st ');
printProcess(); //follow arrow funtion after 1st print
console.log('it will print at the end');
//Expected output below:
// it will print 1st
// it will print 2nd
// it will print after added 3 second with current time
// it will print at the end