Javascript Get Started with code walkthrough
Connect to the XRP Ledger and query it for data.
For more context, see the Get Started tutorial for your preferred language: