The Complete JavaScript Learning Guide

JavaScript is a programming language standardized as ECMAScript. It is widely used to make web pages interactive and also runs on servers and in other environments.

How JavaScript works

A JavaScript engine runs your instructions. The language uses values and objects, and it can respond to events such as a button click or a network reply.

What you will learn

You will begin with basic values and decisions, then learn functions, objects, collections, browser interaction, asynchronous work, and project structure.

How to use this guide

  1. Start with Chapter 1 and move through the chapters in order. New ideas build on the earlier ones.
  2. Type each example yourself, make a small change, and predict what will happen before running it.
  3. When a chapter is ready, its lesson will appear at the chapter link. These pages are currently blank lesson starters.

A step-by-step learning path

  1. Chapters 1-7: Learn the language basics. Run JavaScript, work with values and variables, receive input, make decisions, repeat actions, and write functions.
  2. Chapters 8-12: Work with data and objects. Use arrays and other collections, process text, understand object references, and model information with objects and classes.
  3. Chapters 13-18: Build organized applications. Learn scope, modules, packages, standard APIs, files, errors, debugging, and testing.
  4. Chapters 19-24: Build for real situations. Explore algorithms, asynchronous work, reliability and performance, developer tools, and guided projects.

JavaScript ideas you will meet early

Your first JavaScript program

Create a file named hello.js with this instruction:

console.log("Hello, world!");

console.log writes a message to the runtime's console. The quoted text is a string, and the semicolon marks the end of the instruction. To run this file with Node.js, open a terminal in its folder and enter:

node hello.js

To run JavaScript in a web page, the page must load a script file; the browser console is also a useful place to try short examples. Node.js is one option for running the first file above without building a web page.

A simple way to study

First file: save your first program as hello.js. A typical way to run it is node hello.js with Node.js installed.

Course chapters

Follow the 24 chapters in order, or choose a topic to revisit. Each chapter opens its own lesson page.

  1. What JavaScript is and how a program runs
  2. Your first program
  3. Values, types, and variables
  4. Input and output
  5. Expressions and operators
  6. Decisions and loops
  7. Functions and program structure
  8. Collections: arrays, lists, and slices
  9. Strings and text
  10. References, pointers, and memory
  11. Memory and resource management
  12. User-defined types and data modeling
  13. Scope, lifetime, and visibility
  14. Modules, imports, and declarations
  15. Multi-file programs, packages, and libraries
  16. The standard library and ecosystem
  17. File input and output
  18. Errors, debugging, and testing
  19. Data structures and algorithms
  20. Advanced language topics
  21. Safety, portability, and performance
  22. Build systems and professional workflow
  23. A project ladder
  24. Further study checklist
0% read