Public
Edited
Jan 5, 2023
1 fork
1 star
Insert cell
Insert cell
fizzbuzz_CODINGGARDEN(20)
Insert cell
Insert cell
Insert cell
_.times(20, (i) => fizzbuzz(i + 1))
Insert cell
fizzbuzz = (i) =>
`${i % 3 === 0 ? "Fizz" : ""}${i % 5 === 0 ? "Buzz" : ""}` || i
Insert cell
Insert cell
[...fizzbuzz_generator(20)]
Insert cell
fizzbuzz_generator = function* (n) {
for (let i = 0; i < n; i++) {
yield fizzbuzz(i);
}
}
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