How do you make JavaScript projects?

Hey so this might be a stupid question, but is there a way to make your own JavaScript projects? So far I’ve just been writing code during the courses/lessons. But how can I make my own JavaScript program so I can practice writing code there? Like using a live editor? Thanks for taking the time and reading this! :smile:

Since there is nothing to buy or install save maybe a text editor (I use Notepad++, which is free) you are ready to go.

Open your text editor, create an HTML document (a blank web page is enough), then write your script at the bottom of the body.

<body>
    <div>

    </div>
    <script type="/textjavascript">

    </script>
</body>

You can also write JS files as standalone but you cannot run them without Node.js and that has a learning curve.

If you are online all the time then try out REPL.IT (repl.it) which is free for public access. You can choose the language(s) you want to work in with each new REPL.

JavaScript is built in to the browser, and there is a Developer Console where you can run code. I use the Chrome JS console (Ctrl+Shift+J) for testing.

2 Likes