HexLibraryHexLibrary
</> HexCodeSign inSign up
PythonJavaScriptTypeScriptCC++JavaPHPGoRustRubyBashSQLLuaPerlCOBOLPascalDelphiFortranDartSwiftC#JuliaGroovyRElixirHaskellKotlinScalaClassic ASPClipperMS-DOS
LESSONS
Introduction to JavaScriptVariables (let / const)Data TypesOperatorsStringsArraysObjectsConditions (if / else)Loops (for / while)FunctionsArrow Functions (=>)Array Methods (map / filter / reduce)
REFERENCE
📖 Overview
🖥️ Output & Console
📦 Variables
🔢 Numbers & Math
✍️ String
📋 Array
🗂️ Object
🔁 Condition & Loop
🧩 Function
🔄 Type & Conversion

JavaScript lessons

Language of the Web

JavaScript is the only programming language that runs in the browser. The menu that opens when you click on a web page, form validation without submitting, the cart total updating without refreshing the page — they are all JavaScript. Starting out as a language written in ten days in 1995, it has become the world's most used language today.

With the release of Node.js in 2009, JavaScript broke out of the browser and started running on the server as well. This made it possible to write both the frontend and the backend using a single language. Today, frontend libraries like React, Vue, and Svelte, and server frameworks like Express and Next.js all stand on top of JavaScript.

The most misunderstood part of the language is its asynchronicity: JavaScript runs on a single thread, but it doesn't freeze while waiting for data from a server; it queues the waiting by saying "let me know later." That's why Promise and async/await are the most critical topics to learn after loops and conditions.

📖 Command Reference→
  • •

    Introduction to JavaScript

    First step into JavaScript, the language of the web: printing with console.log, variables, and simple operations — line by line with colorful explanations.

    →
  • •

    Variables (let / const)

    Creating variables, constants with const, mutable variables with let, and naming rules.

    →
  • •

    Data Types

    string, number, boolean types; checking types with typeof and conversion with Number()/String().

    →
  • •

    Operators

    Math (+ - * / % **), comparison (=== !== < >), and logical (&& || !) operators.

    →
  • •

    Strings

    String concatenation, length, uppercase/lowercase and formatting with template literals ( `${}` ).

    →
  • •

    Arrays

    Creating arrays, accessing elements, adding/removing (push/pop), and iterating with loops.

    →
  • •

    Objects

    Storing data with key-value pairs, accessing and adding properties.

    →
  • •

    Conditions (if / else)

    Decision making with if-else, comparisons, logical operators, and the ternary operator (? :).

    →
  • •

    Loops (for / while)

    for for fixed repetition, for...of for traversing arrays, while for conditional repetition.

    →
  • •

    Functions

    Defining functions with function, parameters, returning values with return, and default parameters.

    →
  • •

    Arrow Functions (=>)

    short function definition without writing function; ideal for one-liners and use with array methods.

    →
  • •

    Array Methods (map / filter / reduce)

    Transforming (map), filtering (filter), and reducing arrays to a single value (reduce) — the heart of modern JS.

    →

What you will learn

  • Printing output with console.log; the difference between let, const, and var
  • Storing data with arrays and objects, and transforming them with map and filter
  • Writing functions and arrow function syntax
  • Reading and modifying page content via the DOM
  • Responding to clicks and keyboard input with event listeners
  • Fetching data from a server with Promise and async/await

Who is this for?

  • Anyone entering web development — there is no alternative in the browser
  • Those who know HTML and CSS and want to add motion to their page
  • Developers who want to write both frontend and backend with a single language

When to use?

JavaScript is the right choice for web interfaces, single-page applications, browser extensions, API servers with Node.js, and desktop applications with Electron.

It is not suitable for intensive mathematical calculations, image processing, or real-time system software. As your project grows and multiple people start editing the same code, switching directly to TypeScript instead of JavaScript allows you to catch type errors before running.

Frequently asked questions

Are JavaScript and Java the same thing?

No, they have no relation. The similarity in name was entirely a marketing-driven choice in 1995. Java is a compiled, strongly-typed, class-based language; JavaScript is an interpreted, loosely-typed, prototype-based language. Code written for one will not run in the other.

What is the difference between let, const, and var?

You cannot reassign a value to a name defined with const, but you can with let; both are only valid within the block they are defined in. var, on the other hand, is the old method; it uses function scope instead of block scope and leads to unexpected behavior. Practical rule: use const by default, let if you need to change it, and never use var.

Do I need to learn jQuery?

Not necessary for new projects. Most of the problems jQuery solved — browser incompatibilities, long DOM commands — are now solved within the language itself; querySelector and fetch handle this job. You only need to learn it if you take over an older project that uses jQuery.

Should I learn JavaScript first, or React?

JavaScript first. React is a library built on top of JavaScript; learning React without knowing array methods, destructuring assignment, and asynchronicity turns into copying patterns without understanding the code. Move on to React once you are comfortable with array and object operations.

Summary

Since JavaScript is the only language of the browser, it is an essential stop for web development; with Node.js, it also extends to the server. In this training, we progress from the fundamentals like variables and loops to modifying the page with the DOM and fetching data with async/await.

HexLibraryHexLibrary

Learn programming more clearly. Every command is explained line by line with colors, reinforced with runnable exercises, test your code instantly — all in one place, free.

Learn

  • Home
  • Languages & Lessons
  • HexCode

Company

  • About
  • Contact

Legal

  • Privacy Policy
  • Terms of Use

Other Projects

  • HexToolz
  • Free Service Manuals
© 2026 HexLibrary · The clearest way to learn code