The best way to learn a library than coding with it. If you follow the examples in this book and try them out as you read, I'm sure that your learning path will be quick. Also, make sure you set up your browser's development environment as indicated in Chapter 1: Introduction, so that you can catch programming errors quickly. Errors are a great learning resource, as long as you can find them and fix them. If you get stuck, you can always rely on the code examples.
When writing this book, I did my best to provide the most accurate information possible. All code listings were tested, and additional efforts were made to guarantee that all code examples are properly referenced in the book and work as expected. This book is based on D3.js version 5.9.2. I expect that the code examples should continue working with any 5.x version but there is a small possibility that some code may not work as expected if you are using a later version.