I’ve made an interactive notebook with Observable to show how you can implement autodifferentiation from scratch.