Published
Edited
Jan 30, 2022
1 star
Insert cell
Insert cell
{
foo; // already declared, no error
foo(); // and it actually runs!
a; // already declared, but a is undefined
// b; // ReferenceError: Cannot access 'b' before initialization
// c; // ReferenceError: Cannot access 'c' before initialization
// bar; // ReferenceError: Cannot access 'bar' before initialization
baz; // declared, but not defined yet (like any other var)
// baz(); // TypeError: baz is not a function

const b = 123;
let c = 123;
var a = 123;
function foo() {}
const bar = function () {};
var baz = function () {};
}
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