Introduction: Why JavaScript in 2025 is Your Best Start
JavaScript is not just a language for animating buttons on a website. In 2025, it has evolved into a universal platform that works everywhere: from the browser to the server, from mobile applications to the Internet of Things. If you have decided to start programming, JavaScript is the most logical and fastest way to enter IT.
Why right now? The ecosystem has matured: Node.js 22+ is stable and performant, tools like npm and ESLint have become standard, and the community releases thousands of packages every day. The main thing is you don't need complex setups. Open a terminal, write code, and see the result. In this article, I will show you where to start so that you can write your first program in just 30 minutes.
Step 1: Setting Up the Environment — Node.js and Code Editor
In 2025, writing JavaScript only in the browser is a thing of the past. For serious learning and work, you will need Node.js — a runtime environment that allows you to run JS on your computer.
How to Install Node.js
Go to the official website nodejs.org and download the LTS version (recommended for beginners). The installer will do everything itself — you just need to click "Next". After installation, check that everything works:
node --version # Should show v22.x.x or highernpm --version # Package manager, comes bundledIf you see version numbers — you are ready. Now choose a code editor. Visual Studio Code (VS Code) is the industry standard. Install it, then add extensions: ESLint, Prettier, and JavaScript (ES6) code snippets. They will keep your code clean and help avoid errors.
First Program "Hello, World"
Create a folder for projects, inside it a file index.js and write:
// index.jsconst greeting = "Hello, JavaScript 2025 world!";console.log(greeting);Run it in the terminal:
node index.jsCongratulations! You have just written and executed your first JavaScript program. This is the foundation we will build upon.
Step 2: Syntax Basics — Variables, Data Types, and Functions
Now that the environment is ready, let's break down the basic language constructs. In 2025, the ES2025 (ECMAScript) standard has added several convenient features, but the foundation remains unchanged.
Variables: let, const, and var
Forget about var — it is outdated. Use const for values that don't change, and let for mutable ones:
const userName = "Alexey"; // Cannot be reassignedlet age = 25; // Can be changedage = 26; // Works
// Using var is not recommendedvar oldWay = "outdated"; // Deprecated syntaxData Types: From Strings to Symbols
JavaScript is a dynamically typed language. This means the variable type is determined automatically. Main types:
- String — strings:
"Hello",'World',\\`template string\\`(backticks) - Number — numbers:
42,3.14,NaN - Boolean — logical values:
true,false - Null and Undefined — absence of value
- Object — objects and arrays
Example of working with different types:
const name = "Maria";const year = 2025;const isStudent = true;
// Template strings (very convenient!)const message = `Hello, ${name}! It is ${year}. Student? ${isStudent}`;console.log(message);Functions: Classic and Arrow
Functions are blocks of code that