Sync Execution of functions

by Uday Hiwarale

HTML

<script src="https://rawgit.com/eu81273/jsfiddle-console/master/console.js"></script>

JavaScript

function a() {
	setTimeout( function() {
        console.log( 'result of a()' );
    }, 1000 );
}

function b() {
	setTimeout( function() {
        console.log( 'result of b()' );
    }, 500 );
}

function c() {
	setTimeout( function() {
        console.log( 'result of c()' );
    }, 1000 );
}

// call in sequence
a();
b();
c();