Published
Edited
Feb 17, 2022
1 fork
Also listed in…
Tips and Utilities
Insert cell
Insert cell
Insert cell
Insert cell
{
Array.from(new Set([1, 2, 3, 2, 1])); // => [1, 2, 3]
[1, 2, 3, 4, 5].groupBy(it => it % 2); // => { 1: [1, 3, 5], 0: [2, 4] }
Promise.resolve(42).then(x => console.log(x)); // => 42
structuredClone(new Set([1, 2, 3])); // => new Set([1, 2, 3])
queueMicrotask(() => console.log('called as microtask'));
}
Insert cell
CoreJS = import('https://cdn.skypack.dev/core-js@3.21.1?min')
Insert cell
{
yield CoreJS.structuredClone(new Set([1, 2, 3])); // => new Set([1, 2, 3])
}
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