Welcome Guest! (App Version 3.1)

websitnero logo name

Asynchronous Operations

Asynchronous Operations in JavaScript

Asynchronous operations are those kinds of operations of set of code which do not have well defined timeline to be completed. And, if we rely to move to next line waiting to their completion, that might delay the processing the code and provide pretty bad user experience.

Examples of asynchronous operations are:

  • Ajax Calls or http requests
  • setTimeOut
  • Loading high resolution image

Note: "JavaScript is a single-threaded language and all the code is executed in a single sequence as there is no concept of parallel execution or multiple threaded execution in JS."

Note: "JavaScript has "asynchronous non-blocking Input Output model"."

Asynchronous programming may be called to be non-blocking programming or even in some cases parallel programming where a set of code that is running and taking time keeps going on, while further processing does not stop and keeps going on too. When the first set of code gets its result or data then a callback function is executed. This gives a mirage or effect of parallel programming in JavaScript which is in reality not true, as JavaScript is a single threaded language and multi-threading is not possible.

WebsiteNero is highly optimized for learning various website developing technlogies. We try our best to add maximum modules and examples to help learn the concepts clearly and vividly. We try to present all content and examples as simple as we can removing any complexity to hurdle easy understanding. We try best provide you with worthful content, but we cannot guarantee full correctness of all the content on this site. While using this website, you agree to have read and accepted all our terms of use and conditions, cookie, and privacy policy. Copyright, 2013-2018 by websitenero.com. All Rights Reserved.