Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
funcaoA = function(entrada) {
return entrada;
}
Insert cell
funcaoA('Função Anônima')
Insert cell
Insert cell
funcaoB = (a, b) => {
return a * b;
}
Insert cell
funcaoB(10, 5)
Insert cell
Insert cell
Insert cell
1 + " mais " + 1 + " = " + (1 + 1) // Expressão simples
Insert cell
dois = 1 + 1 // Definição do nome 'dois'
Insert cell
Insert cell
três = dois + 1
Insert cell
Insert cell
1 + (dois = 7)
Insert cell
Insert cell
{
var a = 1;
return a + três;
}
Insert cell
Insert cell
quatro = {
var a = 1;
return a + três;
}
Insert cell
Insert cell
não_é_o_que_você_espera = {
x: 1;
}
Insert cell
Insert cell
um_objeto = ({ x: 1 })
Insert cell
outro_objeto = {
return { x: 1 };
}
Insert cell
Insert cell
uma_célula_errada = {
var y = { return 1 + 1};
return y;
}
Insert cell
Insert cell
uma_célula_correta = {
var y = (function() {
return 1 + 1;
})();
return y;
}
Insert cell
Insert cell
Insert cell
{
var a = 1;
let b = 1;
const c = 1;
{
let b = 100;
a += b + c;
}
return [a, b, c];
}
Insert cell
Insert cell
meuObjetoB = ({ chave1: 'valor1', chave2: 'valor2', chave3: 'valor3' })
Insert cell
Insert cell
minhaArrayB = ['valor1', 'valor2', 'valor3']
Insert cell
Insert cell
Insert cell
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