--- html: get-started-using-javascript-library.html parent: javascript.html seo: description: Build an entry-level JavaScript application for querying the XRP Ledger. top_nav_name: JavaScript top_nav_grouping: Get Started labels: - Development showcase_icon: assets/img/logos/javascript.svg --- {% code-walkthrough filesets=[ { "files": [ "/_code-samples/get-started/js/base.html", "/_code-samples/get-started/js/get-acct-info.js"], "downloadAssociatedFiles": ["/_code-samples/get-started/js/*"], } ] %} # Get Started Using JavaScript Library This tutorial guides you through the basics of building an XRP Ledger-connected application in JavaScript or TypeScript using the [`xrpl.js`](https://github.com/XRPLF/xrpl.js/) client library in either Node.js or web browsers. The scripts and config files used in this guide are {% repo-link path="_code-samples/get-started/js/" %}available in this website's GitHub Repository{% /repo-link %}. ## Learning Goals In this tutorial, you'll learn: * The basic building blocks of XRP Ledger-based applications. * How to connect to the XRP Ledger using `xrpl.js`. * How to get an account on the [Testnet](/resources/dev-tools/xrp-faucets) using `xrpl.js`. * How to use the `xrpl.js` library to look up information about an account on the XRP Ledger. * How to put these steps together to create a JavaScript app or web-app. ## Requirements To follow this tutorial, you should have some familiarity with writing code in JavaScript and managing small JavaScript projects. In browsers, any modern web browser with JavaScript support should work fine. In Node.js, **version 14** is recommended. Node.js versions 12 and 16 are also regularly tested. ## Start Building When you're working with the XRP Ledger, there are a few things you'll need to manage, whether you're adding XRP to your [account](../../../concepts/accounts/index.md), integrating with the [decentralized exchange](../../../concepts/tokens/decentralized-exchange/index.md), or [issuing tokens](../../../concepts/tokens/index.md). This tutorial walks you through basic patterns common to getting started with all of these use cases and provides sample code for implementing them. Here are some steps you use in many XRP Ledger projects: 1. [Import the library.](#1-import-the-library) 1. [Connect to the XRP Ledger.](#2-connect-to-the-xrp-ledger) 1. [Get an account.](#3-get-account) 1. [Query the XRP Ledger.](#4-query-the-xrp-ledger) 1. [Listen for Events.](#5-listen-for-events) ### 1. Import the Library How you load `xrpl.js` into your project depends on your development environment: {% step id="import-web-tag" %} #### Web Browsers Add a `