Published
Edited
Apr 26, 2019
Fork of Untitled
Insert cell
Insert cell
md`## Count: ${count}`
Insert cell
viewof run = button("Run")
Insert cell
viewof reset = button("Reset")
Insert cell
mutable count = 0
Insert cell
function foo() {
mutable count += 1;
// do some work...
return "ok ";
}
Insert cell
function a() {
return foo() + "a";
}
Insert cell
function b() {
return foo() + "b";
}
Insert cell
runner = {
run;
return `${a()}, ${b()}; foo() called ${mutable count} times.`;
}
Insert cell
resetter = {
reset, foo, a, b;
mutable count = 0;
}
Insert cell
import {button} from "@jashkenas/inputs"
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