I imagine that this is also the case with coding. You have to start somewhere, so why not start with something simple? The way I like to start is with a simple but interesting little application that I can make a quick video of, or I can write a small HTML file with the code that I want added, and then I can test it out.
You can use a text editor like Sublime Text or TextMate with the JS file type extension, but you can also use something like Visual Studio Code or webStorm.
One simple way to get the code into the editor is to just type the code into the editor and press Enter. You can then edit your page by right clicking on the page, and selecting “Open in Code”, or you can open the file in whichever editor you prefer.