Published
Edited
Sep 1, 2022
6 stars
Insert cell
Insert cell
Array.from({ length: 10 }, (_, i) => i + 1)
Insert cell
Insert cell
Array.isArray({ length: 10 })
Insert cell
Insert cell
(_, i) => i + 1
Insert cell
Insert cell
Insert cell
[...Array(10)].map((_, i) => i + 1)
Insert cell
Insert cell
Array(10) // An array of length 10 with no set elements
Insert cell
[...Array(10)] // An array of 10 set elements
Insert cell
[...Array(10)].map((_, i) => i + 1) // a range
Insert cell
Insert cell
(() => {
for (var l = [], i = 1; i <= 10; l.push(i++)) {}
return l;
})()
Insert cell
Insert cell
Insert cell
[...Array(10).keys()]
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