Published
Edited
Jan 13, 2021
3 stars
Insert cell
Insert cell
Insert cell
Insert cell
freshPizza = function() {
// private field
let slices = pizza.slice()
return function() {
if (slices.length)
slices.pop()
return slices
}
}
Insert cell
Insert cell
eatSlice = {
const eatSlice = freshPizza()
const pizzaLeft = eatSlice()
expect(pizzaLeft.length).to.equal(5)
return eatSlice
}
Insert cell
Insert cell
{
const pizzaLeft = eatSlice()
expect(pizzaLeft.length).to.equal(4)
return pizzaLeft
}
Insert cell
Insert cell
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