Before you can begin interacting with FNS, you will need to obtain a reference to the FNS registry. How you do this depends on the library you are using.
Example code for the Javascript-based APIs (web3.js and ethers.js) here expect that they are being run inside a DApp browser, such as Chrome with metamask installed, which exposes the ethereum object.