Public
Edited
May 26
Insert cell
Insert cell
// Declare a variable and output its value
greeting = "Hello, Observable!";
Insert cell
Insert cell
console.log("This will show in the browser console, not here.");
Insert cell
sayHello = function(name) {
return `Hello, ${name}!`;
}
Insert cell
sayHello("Observable User")
Insert cell
Insert cell
fruits = ["Apple", "Banana", "Cherry"];
Insert cell
fruits.map(fruit => `I like ${fruit}`).join(", ")
Insert cell
Insert cell
import { Inputs } from "@observablehq/inputs";
Insert cell
nameInput = Inputs.text({label: "Enter your name", value: "Observable User"})
Insert cell
volume = Inputs.range([0, 100], {label: "Volume", value: 50})
Insert cell
color = Inputs.select(["Red", "Green", "Blue"], {label: "Pick a color"})
Insert cell
Inputs.button("Click me!")
Insert cell
sayHello(nameInput.value)
Insert cell
Insert cell
Type Markdown, then Shift-Enter. Ctrl-space for more options. Arrow ↑/↓ to switch modes.

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