Published
Edited
Sep 1, 2020
1 fork
21 stars
Insert cell
Insert cell
mutable foo = false
Insert cell
Insert cell
loop1 = {
while (foo) {
await Promises.tick(1000);
++mutable count1;
}
}
Insert cell
mutable count1 = 0
Insert cell
Insert cell
Insert cell
Insert cell
async function loop2(foo) {
while (foo) {
await Promises.tick(1000);
}
}
Insert cell
Insert cell
loop2(false)
Insert cell
Insert cell
loop2(true)
Insert cell
Insert cell
loop3 = {
if (!foo) return;
while (true) await Promises.tick(1000);
}
Insert cell
Insert cell
Insert cell
loop4 = {
if (!foo) return;
while (true) yield Promises.tick(100);
}
Insert cell
Insert cell
loop5 = {
if (!foo) return;
const abort = invalidation.then(() => Promise.reject("abort"));
while (true) await Promise.race([abort, Promises.tick(100)]);
}
Insert cell
Insert cell
loop6 = {
let run = foo;
invalidation.then(() => run = false);
while (run) await Promises.tick(100);
}
Insert cell
Insert cell

Purpose-built for displays of data

Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Learn more