Skip to content

Instantly share code, notes, and snippets.

@lekhanh1234
Created August 8, 2016 04:11
Show Gist options
  • Select an option

  • Save lekhanh1234/f76bf2eef27d1ab743650548b642c779 to your computer and use it in GitHub Desktop.

Select an option

Save lekhanh1234/f76bf2eef27d1ab743650548b642c779 to your computer and use it in GitHub Desktop.

Asynchronous and Synchronous

An example of Asynchronous:

setTimeout(function(){
    alert('1');
}, 0);
 
alert('2');

setTimeout is a Asyn function.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment