Javascript is always synchronous and single-threaded meaning if you're executing a Javascript block of code on a page then no other Javascript on that page will currently be executed. Synchronous means after one function is complete only the other will load.
Synchronous calls Fiddle[
^]
Javascript is only asynchronous in the sense that it can make, for example, AJAX calls. The code will stop executing until the call returns (successfully or in error), at which point the callback will run synchronously. No other code will be running at this point. It won't interrupt any other code that's running.
Thus you can always, perform synchronous operations for calling javascript functions unless u make an ajax request.
Thanks
:)