/AsynchronismCourseJS

Primary LanguageJavaScriptMIT LicenseMIT

AsynchronismCourseJS

In this course, I learned the principal structures of JS to work with asyncronism: call backs, promises and sync and await, and doing some challenges with APIs.

Asynchronism

JavaScript is a syncronism langueaje, it executes its on a first-come, first-served basis. JavaScript has event loop, it takes care of visualizing all the input and output processes.

Callbacks

It's a function that receives another function as a parameter, to execite a process asynchronously.

First Challenge

In the first challenge, I make a request to an API, using xmlhttp.

XMLHTTP

It's a JavaScript object designed by Microsoft, to make requests to web servers.

Install

We can install this dependency through npm with the following command: npm install xmlhttprequest

With this, we can use all the xmlhttp methods and successfully make our requests.

Promises

It uses the promise object to be executed now, later or never.

Async and Await

It makes our code behave synchronously.