Public
Edited
Jul 6, 2023
Insert cell
Insert cell
viewof amount = Inputs.range([0, 200], {label: "Amount", step: 1})
Insert cell
viewof tipPercent = Inputs.radio([10, 12, 15, 18, 20, 25],
{label: "Tip Percentage", value: 20})
Insert cell
tip = amount * (tipPercent / 100)
Insert cell
A **${tipPercent}%** tip on **$${amount.toFixed(2)}** is **$${tip.toFixed(2)}**, for a total of **$${(amount+tip).toFixed(2)}**
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