Skip to main content

Command Palette

Search for a command to run...

Introduction to JavaScript

Updated
6 min readView as Markdown
Introduction to JavaScript
G

Hello! I'm a dedicated software developer with a passion for coding and a belief in technology's impact on our world. My programming journey started a few years ago and has reshaped my career and mindset. I love tackling complex problems and creating efficient code. My skills cover various languages and technologies like JavaScript, Angular, ReactJS, NodeJs, and Go Lang. I stay updated on industry trends and enjoy learning new tools. Outside of coding, I cherish small routines that enhance my workday, like sipping tea, which fuels my creativity and concentration. Whether debugging or brainstorming, it helps me focus. When I'm not coding, I engage with fellow developers. I value teamwork and enjoy mentoring newcomers and sharing my knowledge to help them grow. Additionally, I explore the blend of technology and creativity through projects that incorporate art and data visualization. This keeps my perspective fresh and my passion alive. I'm always seeking new challenges, from open-source contributions to hackathons and exploring AI. Software development is more than a job for me—it's a passion that drives continuous learning and innovation.

"Last updated: September 2026"

Where JavaScript runs

JavaScript started as a browser language, and for its first decade that was all it was. That is no longer true.

In the browser. Still the original job — reacting to clicks, updating the page, calling APIs. Every browser ships a JavaScript engine.

On the server. Node.js took the V8 engine out of Chrome in 2009 and let JavaScript run as a normal program. Today the same language handles your database queries and your button clicks. Deno and Bun are newer runtimes doing the same job with different trade-offs.

On the edge. Cloudflare Workers, Vercel and similar platforms run JavaScript in data centres close to the user, for work that needs to happen before a request reaches your server.

In mobile and desktop apps. React Native builds native mobile apps, Electron builds desktop ones. VS Code is a JavaScript application.

This matters for how you learn it. Everything in this series — types, functions, closures, async — is the language, and it works identically in all of those places. What changes is the surrounding environment: the browser gives you document and window, Node gives you fs and process. Learn the language first and the environments become details.

The language ships every year now

For a long stretch JavaScript barely changed. Between ES5 in 2009 and ES6 in 2015 there was nothing — six years of silence, which is why so many tutorials from that era still look current and are not.

ES6 changed the process as much as the language. Since 2015, a new version ships every June with whatever features are finished by then:

Version Year What it brought
ES5 2009 strict mode, JSON, array methods
ES6 / ES2015 2015 let/const, arrow functions, classes, promises, modules, template literals
ES2016–2019 async/await, spread on objects, flat, trimStart
ES2020 2020 ??, ?., BigInt, dynamic import()
ES2021 2021 replaceAll, logical assignment, numeric separators
ES2022 2022 at(), private class fields, top-level await
ES2023 2023 immutable array methods — toSorted, toReversed
ES2024–ES2026 Object.groupBy, the Temporal date API, and more

Two things follow from this. Small yearly releases means nothing breaks — code from 2015 still runs. And it means any tutorial has a shelf life, this one included. When something here does not match what you see in your browser, check MDN.

JavaScript is a scripting or programming language that allows you to implement complex features on web pages.

What does the above statement exactly mean?

JavaScript provides us a way to make webpages interactive. Whatever action we perform on the web page to make it do something, is handled using JavaScript. Without JavaScript, a web page is just a showcase. We can’t do anything with that except keep looking at it or loading different pages inside the browser.

If you are familiar with any other programming language, you can assess that Javascript is a dynamic and high-level Interpreted programming language.

The best way to learn any programming language is to keep practicing, keep coding.

The simplest way to try JavaScript examples is by using browsers' dev tools. To open dev tools there are various options,

  • F12

  • Ctrl+Shift-I / Command+Options+I

  • Right click -> Inspect Element

  • Browser options and find Developer tools option

Once you open the dev tools panel select Console.

image.png

Now inside the console, we can run any JavaScript statement.

image.png

Once you are done practicing small snippets, now it time to work with large/long code snippets.

Consider creating 2 files, 1. hello.html 2. hello.js

Add the following code snippets to respective files.

hello.js

console.log(“Hello world!”);

hello.html

<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8">
        <title>Document</title>
    </head>
    <body>
        <script src="hello.js"></script>
    </body>
</html>

Keep both files at the same location. Then load hello.html into your web browser using a file://URL Open the console, you will see the message “Hello World!”.

🎉 Bingo!!!! We just ran our first JavaScript file.

Let’s check out some more details about JavaScript

JavaScript is a case sensitive language.

What does this mean? This means all language keywords, variables, function names, and identifiers should be typed/used with proper case.

For example:-

var count = 0;
Var Count = 0;
Var COUNT = 0;

All of the above variables are referred to as different variables.

Comments:-

JavaScript supports two types of comments.

Anything written between // and the end of the line is treated as a comment and is ignored by JavaScript.

Another way to add a comment is a multi-line comment. Add your comment in between /* and */

Examples:-

//Single line comment

/* 
Multi-line comment
*/

Identifiers:-

It is a simple name used to represent any variable, function, class, etc.

Identifier rules:-

  1. The identifier should start with character.

  2. The identifier doesn’t allow special characters

  3. An identifier should not start with a digit.

  4. _ is considered a valid character to create an identifier.

Reserved keywords:-

The words that are reserved for language and not allowed for general use as an identifier are known as reserved keywords.

**Examples:- **

  • for

  • async

  • if

  • switch

Optional semicolon:-

Using semicolons are not compulsory in JavaScript.

We can omit a semicolon at the end of the statement, JavaScript automatically inserts a semicolon if we didn’t add one.

That’s it for this article.

In the next article, we will look into How does JavaScript work.
Until then keep practicing, keep coding…

What this series covers

This is part 1 of a series that goes from "what is a variable" to the parts of JavaScript most developers never get around to learning properly.

The core of the language — everything you need to read and write real JavaScript.

  1. Introduction to JavaScript ← you are here

  2. How does JavaScript work?

  3. Types, values, and variables

  4. Numbers in JavaScript

  5. JavaScript Strings

  6. JavaScript Expressions

  7. JavaScript Operators

  8. JavaScript Statements

  9. Mastering JavaScript Objects

  10. JavaScript Arrays

  11. JavaScript Functions

  12. JavaScript Classes

  13. JavaScript Modules Going deeper — the parts that separate someone who can write JavaScript from someone who can debug it at 2am. Scope and closures, generators, the event loop, promises and async/await, memory and garbage collection, and metaprogramming.

Each post stands on its own, so jump to whichever one you need. If you are starting out, going in order will save you time — later posts assume the earlier ones.

Hope you liked it.

Thanks for your time.

Hope you like it, if yes **like & share.**

Happy coding….

How does JavaScript work? 🤔 →

L

Script and durable source is followed for the changes. Paths of the team and essayswriting are funded for the terms. Wave is filed for the help of the portal for the respected gals for the changes for the furious goals for humans.

JavaScript - Basics to Advance

Part 1 of 12

This series will cover everything you need to know about JavaScript from basics to advanced. Please stick with us and take your JS code quality and productivity to another level #JavaScript #JS

Up next

How does JavaScript work? 🤔

"Last updated: September 2026" Did you know the simple statement of JavaScript needs a lot of work done behind the seen to get it executed? Hmm… So the browser doesn’t understand javascript directly

More from this blog

H

Hacker's Haven

28 posts

I'm a Senior Software Developer with expertise in programming languages and tech. Follow me for detailed articles and tutorials on software development tools and frameworks.