$.Callbacks(flags) is a list of functions fired together, the engine behind jQuery 561 events and Deferreds. Flags combine: once, memory (late additions receive the last fired arguments), unique (no duplicates) and stopOnFalse. Lists offer add(), remove(), fire(), fireWith(), disable(), lock() and fired().
$.Deferred() is jQuery's pre-ES2015 promise (Promises and Asynchrony). The owner calls resolve(), reject() or notify(); consumers attach done(), fail(), always(), progress() or then(). Hand out d.promise(), which cannot change state. $.when() works like Promise.all(), and $.ajax() returns a Deferred.
<script src="https://code.jquery.com/jquery-4.0.0.min.js"></script>
<pre id="log" style="margin:0"></pre>
<script>
const log = (msg) => $('#log').append(`${msg}\n`);
$.Callbacks('memory').fire('Ann').add((who) => log(`late listener got ${who}`));
const d = $.Deferred();
d.progress((pct) => log(`progress ${pct}%`)).done((v) => log(`done(): ${v}`));
d.then((v) => log(`then(): ${v}, asynchronously`));
d.notify(50).resolve('data').reject('ignored');
$.when(d, 2).done((a, b) => log(`state ${d.state()}, $.when(): ${a} and ${b}`));
(async () => log(`await: ${await d.promise()}`))();
</script>
done() runs synchronously, but since jQuery 3 then() follows Promises/A+: it runs asynchronously, returns a new promise and turns thrown errors into rejections. A Deferred is a thenable, so await accepts it. A settled Deferred ignores later resolve() and reject() calls. The slim build omits both modules; use native Promises.