Published
Edited
Dec 4, 2019
Insert cell
md`# Require Test`
Insert cell
Type JavaScript, then Shift-Enter. Ctrl-space for more options. Arrow ↑/↓ to switch modes.

Insert cell
text = (await FileAttachment("maze_commonjs.js")).text()
Insert cell
mod_maze = {
var exports = {};
eval(text.toString());
return exports;
}
Insert cell
{
let m = new mod_maze.Maze(10, 10);
return mod_maze.gen_maze(10, 10, 10 * 10 * 10);
}
Insert cell
maze = require(await FileAttachment("maze_amd.js").url())
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