Public
Edited
Jan 26, 2023
2 forks
1 star
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
w = 13
Insert cell
w
Insert cell
{
const angles = [0, 15, 30, 45, 60, 75, 90];
const sines = angles.map(x => Math.sin(x * (Math.PI/180)) );
return sines;
}
Insert cell
const angles = [0, 15, 30, 45, 60, 75, 90];
const sines = angles.map(x => Math.sin(x * (Math.PI/180)) );
return sines;
Insert cell
Insert cell
obj = {
return {x: 10, y: 20};
}
Insert cell
Insert cell
data = {

const random_numbers = [];
for(let i = 0; i < nNumbers; i++){
random_numbers.push(Math.random()*10);
}

return random_numbers;
}
Insert cell
nNumbers = 6;
Insert cell
Insert cell
squared(16)
Insert cell
Insert cell
Insert cell
Insert cell
squared = {
return (a) => { return Math.pow(a,2); }
}
Insert cell
greypin = {
return html`<svg style='vertical-align:middle' viewBox="0 0 16 16" fill='#999999' stroke=none viewBox="0 0 16 16" width=16 height=16><path d="M8 1h3v1l-1 1v4l2 .875V9H9v5.125L8 15l-1-.875V9H4V7.875L6 7V3L5 2V1z"></path></svg>`
}
Insert cell
greyarrow = {
return html`<svg width="16" height="16" viewBox="0 0 16 16" fill="none" transform="rotate(-90) translate(-3,0)"><path d="M13 6.5L8 12L3 6.5" stroke="#999999" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path></svg>`
}
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