Published
Edited
Jan 26, 2021
2 forks
Insert cell
md`# Kada Coding, Class 4 Functions Reloaded`
Insert cell
students = ["Diego", "Cata", "Leon", "Pipe", "JuanA", "Mafe", "Laura"]
Insert cell
students[Math.floor(Math.random() * students.length)]
Insert cell
html`
<p
id="parGreeting"
style="font-size: 46pt; color: red; font-family:cursive"
>
Hola
</p>
`
Insert cell
html` <p id="parGreeting"style="font-size:46pt; color: red; font-family:cursive"> Hola </p> `
Insert cell
function drawCircle(x) {
return `<circle r=10 cx=${x} cy=50 stroke=red></circle>`;
}
Insert cell
html`
<svg width=600 height=300>
${drawCircle(50)}
${drawCircle(100)}

${drawCircle(50)}
<circle r=10 cx=100 cy=100></circle>
<circle r=10 cx=70 cy=110></circle>
<circle r=10 cx=80 cy=110></circle>

</svg>

`
Insert cell
c1 = `<circle r=10 cx=${x1} cy=50 stroke="red"></circle>`
Insert cell
x1 = 50
Insert cell
c2 = `<circle r=10 cx=${x2} cy=50 stroke="red"></circle>`
Insert cell
x2 = 100
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