Promptles
Programming Basics

Promise

intermediate

Definition

In JavaScript, a placeholder for a result that isn't ready yet, such as data still loading, which later either delivers the result or reports that something went wrong.

In the wild

It works like the buzzer a bakery hands you: not the cake itself, but it goes off when the cake is ready or when they've run out. `fetch("/api/orders")` hands back a promise the same way.

More from Programming Basics