Let's say I have 4 functions, every each of them has loops inside working with setTimeout(). How do I make those functions to run in sequence and not overlap? That is, how do I make each of them execute just after previous one is finished?
function1();
function2();
function3();
function4();