Public
Edited
Jan 9, 2024
3 stars
Insert cell
Insert cell
htl.html`<button onClick=${handleClick}>Add to array</button>`
Insert cell
handleClick = () => {
mutable arr.push(new Date());
mutable arr = mutable arr; // assignment triggers reactive update
}
Insert cell
mutable arr = [new Date()]
Insert cell
Insert cell
arr.length
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