No, js is not downloaded.
Just write your code in a text editor.
Include the file in any html document.
Open the html file and you will see the output in the console of your browser.
You can also run the code using node command line. Open the folder in terminal where the js file is stored. Write
(You will have to install nodejs if it isn’t installed)
Filename is the name of your js file(don’t forget to include the .js extension)
Hope it helps you.
checkout this article I wrote: Get your website together | Typing code on your computer