How can I convert this notebook into vanilla js?
Use a functional programing approach by changing cells into functions.