{ }ASYNC//COREPROMISE NEON LAB
SYSTEM ONLINE

// JAVASCRIPT FIELD NOTES 001

Promises
in the wild.

A tiny interactive lab for watching async code change state, survive failure, and hand work to the next process.

01

THE REACTOR

Promise state machine

LIVE

Every promise starts pending, then settles exactly once: fulfilled or rejected.

PENDING
new Promise((resolve, reject) => {
  resolve("signal found");
});
02

THE LOOPBACK

Recursive countdown

A function can call itself. Here, each recursive pulse waits on a promise before descending.

5READY TO DESCEND
countDown(n) {
  if (n === 0) return Promise.resolve();
  return wait().then(() => countDown(n - 1));
}
03

THE HAND-OFF

Callbacks into a promise

Old-school callbacks can be wrapped in a promise, giving their result a clean .then() chain.

01SCANcallback
→
02DECODEpromise
→
03DEPLOY.then()

Awaiting payload...

▸_

OBSERVABILITY

Event stream

TRACE

Lab initialized. Choose a signal.