Public
Edited
Jun 10, 2024
Importers
1 star
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
[...range()]
Insert cell
[...range(1)]
Insert cell
[...range(10)]
Insert cell
[...range(10, null, -1)]
Insert cell
[...range(10, void 0, 1 / 2)]
Insert cell
[...range(10, null, -1 / 8)]
Insert cell
[...range(0, 1, 1 / 49)]
Insert cell
Array.from(range(49), (x) => x / 49)
Insert cell
Array.from(range(11), (x) => 2 ** x)
Insert cell
Array.from(range(11), (x) => Math.cbrt(2 ** x))
Insert cell
// @example
{
await visibility();
for (let i of range(1, 10)) {
yield Promises.delay(duration, i);
}
}
Insert cell
// @example
{
await visibility();
for (let i of range(9, 0)) {
yield Promises.delay(duration, i);
}
}
Insert cell
// @example
{
let [first, second, ...rest] = range(10, null, -10);

return [first, second, rest];
}
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
[...sequence()]
Insert cell
[...sequence(1)]
Insert cell
[...sequence(10)]
Insert cell
[...sequence(10, null, -1)]
Insert cell
[...sequence(-10)]
Insert cell
[...sequence(-10, null, -1)]
Insert cell
[...sequence(10, void 0, 1 / 2)]
Insert cell
[...sequence(10, null, -1 / 8)]
Insert cell
[...sequence(0, 1, 1 / 49)]
Insert cell
Array.from(sequence(0, 10), (x) => 2 ** x)
Insert cell
Array.from(sequence(0, 10), (x) => Math.cbrt(2 ** x))
Insert cell
// @example
{
await visibility();
for (let i of sequence(1, 10)) {
yield Promises.delay(duration, i);
}
}
Insert cell
// @example
{
await visibility();
for (let i of sequence(10, 1)) {
yield Promises.delay(duration, i);
}
}
Insert cell
// @example
{
let [first, second, ...rest] = sequence(10, null, -10);

return [first, second, rest];
}
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