Published
Edited
Jan 29, 2022
Insert cell
Insert cell
function phi (x, y, z) {
const x1 = !!x
const x2 = !!y
const x3 = !!z

return ((x1 && x3) || (!x1 && !x3)) && (!x1 && x2) ? 1 : 0
}
Insert cell
Insert cell
Inputs.table([['x1', 'x2', 'x4', 'ɸ']].concat(inputs.map((params) => {
return [...params, phi(...params)]
})))
Insert cell
Insert cell
Insert cell
function arr (x, y) {
return !(x || y) ? 1 : 0
}
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