DEV Community

Cover image for Where to write and execute JavaScript code? 👩🏻‍💻
TechWorld with Nana
TechWorld with Nana

Posted on

Where to write and execute JavaScript code? 👩🏻‍💻

In this new video 🎬 I explain and show the 3 ways of how to write and execute your JavaScript code.

👩🏻‍💻 Where to write and execute JavaScript

  1. Writing and executing JavaScript directly in the Browser Console is the simplest way to get started. It's practical when you want to try something out, but not an option for real programming. Find out why in the video.
  2. The second option writing JavaScript code in the index.html file (called inline script) is better, but has some disadvantages in structuring and keeping HTML/CSS apart from your logic.
  3. The third and last way to write JavaScript code, is writing the code in a separate JavaScript file and linking this file in the HTML file. This is the way to go, because it is clean and practical when your application gets bigger.

👩🏻‍💻 Simple Text Editor vs. Special Code Editor
I also explain and show you the advantages of writing your JavaScript code in a special code editor instead of writing it in a simple text editor. One example is the highlighting of keywords or syntax error detection, which helps a lot in programming! 💯

👩🏻‍💻 Finally, understanding how files in real projects are structured and referenced will help you a lot when getting started.

Really understanding the above topics, will help you a lot when starting coding. 🙂


✅ I will upload a complete JavaScript Tutorial for absolute beginners. So if you are completely new to programming this will give you a step by step guide to learn JavaScript. You can subscribe on Youtube to get notified 🙂 ✅

I'm happy to connect with you on

Top comments (0)