Public
Edited
Jun 19, 2024
Insert cell
Insert cell
function hello() {
return "hi world!"
}
Insert cell
hello()
Insert cell
Insert cell
A_VARIABLE = 2;
Insert cell
function hello2() {
const b = 3;
return b;
}
Insert cell
hello2()
Insert cell
function hello3() {
const b = 3;

function world() {
return b;
}

return world();
}
Insert cell
hello3()
Insert cell
Insert cell
function hello4() {
return 3;
}
Insert cell
world2 = hello4
Insert cell
world2()
Insert cell
function world3(cb) {
return cb()
}
Insert cell
world3(hello)
Insert cell
world3(() => { return 'hello!' })
Insert cell
Insert cell
function hello5() {
const [a, b] = [2, 3]
return [a, b]
}
Insert cell
hello5()
Insert cell
function hello6([i, j]) {
return [i, j]
}
Insert cell
hello6([2,3])
Insert cell
function hello7({ value }) {
return value
}
Insert cell
hello7({ value: 8 })
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