Public
Edited
Apr 17, 2024
1 fork
Insert cell
Insert cell
Insert cell
2 * 3 * 7
Insert cell
Insert cell
{
var x = 0;
for (let i = 1; i <= 100; ++i) {
x += i;
}
return x;
}
Insert cell
Insert cell
x + 2 // x es una variable no accesible desde esta celda!
Insert cell
Insert cell
margenes = ({top: 20, right: 20, bottom: 30, left: 40})
Insert cell
Insert cell
poligonos = [({nombre: "círculo",radio: 15}),({nombre: "cuadrado",lado: 5}),(({nombre: "triángulo",base: 12,altura:18}))]
Insert cell
Insert cell
function saludar(nombre) {
return `Hola ${nombre}!`;
}
Insert cell
Insert cell
saludar("Susana")
Insert cell
saludar("Marcelo")
Insert cell
Insert cell
color = "red"
Insert cell
Insert cell
letters = { return "ABCDEFGHIJKLMNOPQRSTUVWXYZ".split(""); }
Insert cell
Insert cell
letters.map(l => l.toLowerCase()) // convertir cada letra en letters a lower case
Insert cell
Insert cell
nombreCompleto = `${nombre} ${apellido}`
Insert cell
apellido = "Rial"
Insert cell
nombre = "Juan"
Insert cell
Insert cell
randomWalk = {
var y = 16, values = [y];
for (var x = 0; x < width; ++x) values.push(y = y + (Math.random() - 0.5) * 3 + (16 - y) * 0.1);//cambiá 3->5
return values;
}
Insert cell
Insert cell
stroke = "red" // cambiá steelblue por red
Insert cell
Insert cell

One platform to build and deploy the best data apps

Experiment and prototype by building visualizations in live JavaScript notebooks. Collaborate with your team and decide which concepts to build out.
Use Observable Framework to build data apps locally. Use data loaders to build in any language or library, including Python, SQL, and R.
Seamlessly deploy to Observable. Test before you ship, use automatic deploy-on-commit, and ensure your projects are always up-to-date.
Learn more