Unlisted
Edited
Aug 25, 2023
14 forks
79 stars
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
// Notice that the result of the multiplication expression below is shown above.

3 * 3 * 3
Insert cell
22/7
Insert cell
Insert cell
approximately_two_pi = (22/7) * 2
Insert cell
Insert cell
nameOfFish = "trout"
Insert cell
nameOfPerson = "Mike"
Insert cell
Insert cell
{
let x = 0;
for (let i = 1; i <= 100; ++i) {
x += i;
}
return x;
}
Insert cell
Insert cell
Insert cell
Insert cell
x + 2 // x is not accessible here!
Insert cell
Insert cell
Insert cell
nameOfFish
Insert cell
Insert cell
Insert cell
Insert cell
({oilOrAcrylic: "oil", name: "Cobalt Blue", sizeInMl: 40, priceInUSD: 58.46})
Insert cell
Insert cell
Insert cell
Insert cell
function greet(name) {
return `Hello, ${name}!`;
}
Insert cell
Insert cell
greet("Alice")
Insert cell
greet(nameOfPerson)
Insert cell
Insert cell
Insert cell
color = "red"
Insert cell
Insert cell
letters = { return "ABCDEFGHIJKLMNOPQRSTUVWXYZ".split(""); }
Insert cell
Insert cell
Insert cell
letters.map(l => l.toLowerCase())
Insert cell
Insert cell
Insert cell
fullName = `${firstName} ${lastName}`
Insert cell
lastName = "Lovelace"
Insert cell
firstName = "Ada"
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
stroke = "steelblue"
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