DEV Community

Salvietta150x40
Salvietta150x40

Posted on • Originally published at ma-no.org on

JavaScript: Promises explained with simple real life examples

Handling asynchronous data flows is complex, who hasn't faced creepy codes ?
A Promise is an object that represents the termination or failure of an asynchronous operation. Since most people consume already created promises, this guide will explain first how to consume them, and then how to create them.

Essentially, a promise is a returned object to which callback functions are attached, rather than passing callbacks to a function.

Read on 📖!

Top comments (0)

SurveyJS custom survey software

JavaScript Form Builder UI Component

Generate dynamic JSON-driven forms directly in your JavaScript app (Angular, React, Vue.js, jQuery) with a fully customizable drag-and-drop form builder. Easily integrate with any backend system and retain full ownership over your data, with no user or form submission limits.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay