Start simple, expand from that.
Run your app in your web browser and enable the developer tools with <F12>.
This way you can set break points, watch what your script is doing.
Use async await to handle endpoint calls for simplicity (this is explained with examples in the Recipes topic).
This allows you to use endpoints like you would have used function or method calls in the olde days.