Published
Edited
May 24, 2019
1 fork
Importers
10 stars
Insert cell
Insert cell
array = [tex`A=1`, tex`A=2`]
Insert cell
Insert cell
subject = "world"
Insert cell
md`Hello, ${subject}!`
Insert cell
Insert cell
md`These are my elements: ${clone(array)}`
Insert cell
Insert cell
array.map(a => `- ${a}\n`)
Insert cell
Insert cell
array.map(a => `- ${a}`).join('\n')
Insert cell
Insert cell
array.map(a => md`- ${a}\n`)
Insert cell
Insert cell
md`These are my elements: ${clone(array.map(a => md`- ${a}\n`))}`
Insert cell
Insert cell
md`- ${clone(array)[0]}`.outerHTML
Insert cell
Insert cell
html`<ul>
${clone(array).map(a => html`<li>${a}`)}
</ul>`
Insert cell
Insert cell
md`A list of elements:

${html`<ul>
${clone(array).map(a => html`<li>${a}`)}
</ul>`}`
Insert cell
Insert cell
md`A list of elements:

<ul>
${clone(array).map(a => html`<li>${a}`)}
</ul>`
Insert cell
Insert cell
Insert cell
function clone(elements) {
return elements.map(e => e.cloneNode(true));
}
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