Please ignore the title of this post. It’s an exaggeration. In this post, I want to show an example that has the feel of a Shiny app, but it doesn’t really use Shiny or R as the backend when it runs. This example is from an answer of mine on a forum, and mainly intended for beginners who are interested in learning a little bit JavaScript, although I’m not a JavaScript expert. Below is the full R Markdown document:

—
title: "Change the number of bins of a histogram"
— ```{r, …