Public
Edited
Jan 25, 2023
9 stars
Insert cell
Insert cell
Insert cell
// {
// while (true) {
// // nothing
// }
// }
Insert cell
Insert cell
{
while (true) {
yield;
}
}
Insert cell
Insert cell
{
while (true) {
yield new Date();
}
}
Insert cell
Insert cell
{
let i = 0;
while (true) {
yield i++;
}
}
Insert cell
Insert cell
{
while (true) {
return new Date();
}
}
Insert cell
Insert cell
{
const height = 20;
const context = DOM.context2d(width, height);
while (true) {
const x = ((Math.sin(Date.now() / 1000) + 1) / 2) * (width - height);
context.clearRect(0, 0, width, height);
context.fillRect(x, 0, height, height);
yield context.canvas;
}
}
Insert cell
Insert cell
Insert cell
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