Public
Edited
Apr 7
Paused
1 fork
22 stars
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
questions = d3.shuffle([
...new d3.InternSet(
operation === "÷"
? d3
.cross(d3.range(2, 11), d3.range(1, 11))
.map((p) => [p[0] * p[1], p[1]])
: d3
.cross(d3.range(0, 11), d3.range(0, 11))
.map((p) => (operation === "−" ? p.sort((a, b) => b - a) : p)),
String
)
])
Insert cell
op = ({
"+": (x, y) => x + y,
"−": (x, y) => x - y,
"×": (x, y) => x * y,
"÷": (x, y) => x / y
}[operation])
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