The Guide to JavaScript - Introduction

by Hexagon, , Updated: 2 minutes read javascript guide

The aim of this series is to give a thorough understanding of vanilla JavaScript and its many features. We won't be using any external libraries, and all the code will be cross-runtime. It'll work seamlessly whether you're in a browser or using runtimes like Deno, Bun or Node.js.



Before diving in, let's make something clear: This guide is packed with valuable info, but it won't cover every detail of JavaScript. Think of it as your roadmap to mastering JavaScript.

What You'll Learn

  • Strings and Numbers: Basic and advanced ways to work with text and numbers.
  • Arrays and Objects: How to store and mess around with data.
  • Functions and Classes: Learn how to write reusable code.
  • Promises and Async/Await: Learn how to handle things that take time, like API calls.
  • Error Handling and Debugging: How to find and fix bugs.
  • Closures and Scopes: Understand how JavaScript manages access to data.
  • Prototypes and Inheritance: Get into the object-oriented stuff.
  • Design Patterns: Understand common design patterns to write clean and maintainable code.
  • Anti-Patterns and Best Practices: Learn what not to do and how to write more efficient code.

Each article takes about 5-15 minutes to read, and spare at least 20 minutes for exercises after each.

Our First Dive into JavaScript

Here's a simple JavaScript snippet demonstrating basic features like Variables, Comments, and Console Logging. We'll cover these in depth in future articles.

// Declaring a variable named 'greeting' and assigning it a string value
let greeting = "Hello, World!";

// Logging the value of the variable to the console
console.log(greeting);

When you run this code, you'll see the output Hello, World! displayed.

This series aims to provide a smooth learning curve, no matter where you plan to use JavaScript. You can always choose to run the code using:

  1. The Browser: Open the browser, press F12, paste the code into the console, and hit enter.
  2. Node, Bun or Deno: Save the code into a file, say example.js, and run it using node example.js, deno run example.js or bun run example.js respectively.

Congratulations! You've just written and run your first JavaScript code that works across multiple platforms.

That's it for now, you find the next article on the link just below, or at the top of the page, under "The guide to JavaScript".


Fundamental Concepts