How to use JavaScript and .env files?

I want to create a custom Twilio integration using JavaScript and hide my keys in a .env file, is it possible in Webflow? I saw some users saying to store my JavaScript in a .txt file, do I literally just type JS logic and save it as a .txt, then reference that in my custom code? If so, is it accessible by people inspecting the HTML?

You should be building your app on a server/service where you can run code and secure resources. Webflow is not the tool.