Published
Edited
Feb 21, 2019
1 star
Insert cell
Insert cell
pandemonium = require("https://bundle.run/pandemonium")
Insert cell
pandemonium.shuffle(["apple", "orange", "pear", "pineapple"])
Insert cell
pandemonium.dangerousButPerformantSample(2, [
"apple",
"orange",
"pear",
"pineapple"
])
Insert cell
{
const array = [0.1, 0.1, 0.4, 0.3, 0.1];
return Array.from({ length: 100000 }).map(() =>
pandemonium.weightedRandomIndex(array)
);
}
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