Wallet accounts are cached in an array-like numerically-indexed Map. This means
that deriving an account any time after the first will be faster, and it also
means that deriving a range of accounts will return an object that can be
-treated somewhat like a [sparse array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Indexed_collections#sparse_arrays).
+treated somewhat like a [sparse array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Indexed_collections#sparse_arrays) using the `get/set` syntax of Map objects.
```javascript
try {
const firstAccount = await wallet.account();
const secondAccount = await wallet.account(1);
+const { address, publicKey } = secondAccount;
+
const multipleAccounts = await wallet.accounts(2, 3);
-const thirdAccount = multipleAccounts[2];
-const { address, publicKey } = firstAccount;
+const thirdAccount = multipleAccounts.get(2);
+for (const [i, a] of multipleAccounts) {
+ console.log(`Index ${i} returns account ${a.address}`);
+}
const nodeUrl = "https://nano-node.example.com/";
await firstAccount.refresh(nodeUrl); // online