Published
Edited
Nov 2, 2018
Insert cell
Insert cell
mutable array = []
Insert cell
counter = {
let i = 0;
while (true) {
if (i === 2 - 1) {
let current_array = array.slice(0);
current_array.push(current_array.length);
mutable array = current_array;
yield Promises.delay(1000, (i = 0));
} else {
yield Promises.delay(1000, ++i);
}
}
}
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