how to tell javaScript to do specific task then move forward?
<p>java-script start exevuting second line even if execution of first line is not completed. sometimes it's good but most of time i didn't like it. So do you know anyway to do this..</p>

<p>OK OK guys right now i don't have code but look at this</p>

<p>let me say using setIntervals i want first animate a box to right side then back to initial (both using setInterval() animation) then it will not work fine because before first setInterval finishes working second one will start moving it left....</p>
