Public
Edited
Jan 28
Importers
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
proportionalZip([..."ABCDEFGHIJKLMNOPQRSTUVWXYZ"], [0, 1, 2, 3, 4, 5, 6, 7, 8, 9])
Insert cell
Insert cell
Insert cell
Insert cell
join.array("ABCDEFG", "-")
Insert cell
{
let f = outToArray.define(function test(a, b, c) { return b; });
console.dir(f);
return f;
}
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
takeTag({concat: true}, s => s)`a${0}b${1}c${2}`
Insert cell
takeTag.concat`a${0}b${1}c${2}`
Insert cell
takeTag()`a${0}b${1}c${2}`
Insert cell
takeTag()`a${0}b${1}c${2}d`
Insert cell
takeTag()("a", 0, "b", 1, "c", 2, "d")
Insert cell
Insert cell
is.number(12)
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
[...walkDownNode(document)].length
Insert cell
Insert cell
Insert cell
Insert cell
// not currently working
function truncateNode(node, length) {
if (node instanceof Text) {
if (node.length > length) {
node.textContent = node.substringData(0, length);
}
} else if (nodeDeepLength(node) > length) {
let deleting = false;
for (let child of node.childNodes) {
if (deleting) {
child.remove();
continue;
} else {
let childLen = nodeDeepLength(child);
if (childLen > length) {
truncateNode(child, length);
deleting = true;
} else {
length -= childLen;
}
}
}
}
return node;
}
Insert cell
Insert cell
Insert cell
tryIt(() => 3)
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
{ return debug.ger = Math.random(); } // Open the developer view, and re-run this cell.
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Type JavaScript, then Shift-Enter. Ctrl-space for more options. Arrow ↑/↓ to switch modes.

Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
d11n.rich.symbol.code`test`
Insert cell
Insert cell
viewof secretTest = secretView("secretTest", Secret("utilities – secretTest"), "utilities – secretTest", invalidation)
Insert cell
viewof secretTestBrief = secretView("secretTest", Secret("utilities – secretTest"), invalidation)
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
to.entries.map(html`<form>
<input type="number"></input>
<input type="number" name="testA"></input>
<select><option>a</option><option>b</option></select>
<input type="date" id="testB"></input>
<input type="text" name="a"></input>
<input type="file"></input>
</form>`.elements)
Insert cell
to.entries({
a: 0, b: 1, c: 2, d: 3
})
Insert cell
Insert cell
Insert cell
Insert cell
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