file.html
Install Live Server plugin in Visual Studio Code and open .html file with this plugin. To disconnect Phantom Wallet go to Settings -> Trusted Apps -> Revoke website you want to disconnect to.
index.js
node file_name.js npx kill-port 8000
index3.ts
npm install -g typescript tsc --init npm install -g ts-node
run: ts-node file_name.ts