Public
Edited
Feb 10, 2024
Insert cell
Insert cell
{
let name = "Andy";
let age = 41;
let lifeExpectancy = 83;

function calcDeath(strings, nameExp, ageExp) {
let string1 = strings[1];
let string4 = ` and will probably die in ${lifeExpectancy - ageExp} years.`;
return `${nameExp}${string1}${ageExp}${string4}`;
}

return calcDeath`${name} is ${age} and will die someday.`;
}
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