Published
Edited
May 28, 2019
Importers
Insert cell
md`# Collection Utilities`
Insert cell
Insert cell
{
let a = {a: 1, b: 2};
let b = {a: 3, c: 4, d: 5};
return Object.assign(a, b)
}
Insert cell
Insert cell
{
let a = {a: 1, b: 2};
let b = {a: 3, c: 4, d: 5};
return {...a, ...b}
}
Insert cell
function set_props(obj, props) {
Object.keys(props).forEach((d)=> {
obj[d] = props[d];
});
}
Insert cell
{
let a = {a: 1, b: 2};
let b = {a: 3, c: 4, d: 5};
set_props(a, b);
return a
}
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