Published
Edited
Feb 12, 2018
Insert cell
Insert cell
Insert cell
Insert cell
x = {
// init
if (this === undefined)
return 0
// update
let value
switch(msg) {
case 'Increment':
value = this + 1
break
case 'Decrement':
value = this - 1
break
}
return value
}
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