ToolScope Notes

JavaScript Notes in Simple English — Code Scope

Free JavaScript notes for beginners: what JavaScript is, variables, data types, operators, decisions, loops, functions, arrays, objects, ES6 features, strings, the DOM, events and forms — then JSON, timers, promises, async/await, the Fetch API, error handling and localStorage, two complete projects (Todo app and Quiz app) and regular expressions. Code examples, common mistakes and practice tasks in every lesson. From the Code Scope JavaScript series.

26 lessons — Code Scope series 3.1–3.26 Read online — free PDF download for every lesson Code you can copy & run

JavaScript Notes

26 LESSONS · CODE SCOPE SERIES 3.1–3.26

The language that makes pages alive: what JavaScript is, variables and data types, operators and decisions, loops and functions, arrays and objects, the modern ES6 toolkit, strings, the DOM and events, forms, JSON, timers, promises and async — and two full projects, a Todo app and a Quiz app, plus regular expressions.

Lesson 3.1

JavaScript Kya Hai? + First Script

What JavaScript is and why every page needs it: the third layer of the web, the script tag, console.log, and your first click that answers back.

Read the notes Video
Lesson 3.2

Variables: let, const, var

Labelled boxes for your data: naming rules, let for changing values, const with its lock, and why old var is avoided — const first.

Read the notes Video
Lesson 3.3

Data Types

The kinds of values JavaScript knows: number, string, boolean, undefined, null and object — typeof, and the famous "5" + 2 = "52" trap with its Number() fix.

Read the notes Video
Lesson 3.4

Operators

Doing the maths and making comparisons: arithmetic, assignment, the === golden rule, logical operators, and decisions built from combos.

Read the notes Video
Lesson 3.5

If/Else & Switch

Code that decides: if, else, else-if ladders, nested doors, the ternary shortcut — and switch with its break, plus when each one wins.

Read the notes Video
Lesson 3.6

Loops: for & while

Repeat work without repeating code: the for loop's three parts, while, the infinite-loop trap, break vs continue, and loops that build real menus.

Read the notes Video
Lesson 3.7

Functions

Reusable machines for your code: declaring and calling, parameters vs arguments, return values, expressions, scope's wall, and a real form validator.

Read the notes Video
Lesson 3.8

Arrays

One name, many boxes: indexes from zero, length, changing items, push/pop/shift/unshift, and loops that turn arrays into page content.

Read the notes Video
Lesson 3.9

Objects

Data with named boxes: properties, dot vs bracket, changing and deleting, methods and this, objects inside arrays, and for...in.

Read the notes Video
Lesson 3.10

Destructuring & Spread

Unpack values in one line: object and array destructuring, defaults, renaming, swaps, the ... spread copy, joining arrays and rest.

Read the notes Video
Lesson 3.11

Array Methods: map, filter, reduce

The factory line for arrays: map transforms, filter selects, reduce folds everything into one value — and a real app shape using all three.

Read the notes Video
Lesson 3.12

Strings & Template Literals

Text done right: quotes vs backticks, ${} placeholders, calculations inside strings, length and indexes, case, search, slice and split.

Read the notes Video
Lesson 3.13

DOM: Selecting & Changing Elements

Reach into the page: the DOM tree, getElementById, querySelector, textContent, styles and classList — and innerHTML's danger warning.

Read the notes Video
Lesson 3.14

Events: click, input, submit

Pages that listen: addEventListener's three parts, click counters, one function for many buttons, live input counters and submit with preventDefault.

Read the notes Video
Lesson 3.15

Forms Handling (mini build)

A complete small form: read every value, validate empty fields and emails live, show errors, a success state, and the submitted data on the page.

Read the notes Video
Lesson 3.16

ES6: Arrow Functions

The shorter function: arrow syntax, one-line returns, the object-literal trap, arrows inside map and filter, and a brief honest note on this.

Read the notes Video
Lesson 3.17 (Short)

ES6: Modules (import/export)

Split code into files that share: export what others need, import what you use, named vs default exports — one concept, from the Short.

Read the notes Video
Lesson 3.18

JSON

The format data travels in: JSON rules, JSON.parse and JSON.stringify live, reading a real API response, and the mistakes that break it.

Read the notes Video
Lesson 3.19 (Short)

Timers — setTimeout + setInterval

Time as a feature: run code once later with setTimeout, again and again with setInterval, stopping with clear — and the 2 vs 2000 mistake.

Read the notes Video
Lesson 3.20

Callbacks → Promises

Waiting without freezing: callbacks and their pyramid of doom, the Promise and its three states, .then/.catch and chaining that reads clean.

Read the notes Video
Lesson 3.21

async / await

Promises that read like normal code: async functions, await, side-by-side with .then, try/catch for failures, and the Promise.all lesson.

Read the notes Video
Lesson 3.22

Fetch API + Real API Project

Real data from a real API: fetch, the two-step response, building User Cards from jsonplaceholder — with loading and error states done properly.

Read the notes Video
Lesson 3.23

Error Handling & localStorage

Apps that survive mistakes: try/catch/finally, throw, and localStorage — saving data in the browser so a refresh loses nothing.

Read the notes Video
Lesson 3.24

Todo App Project

The whole series in one app: add, complete and delete tasks, clean rendering, and localStorage persistence proven with a refresh test.

Read the notes Video
Lesson 3.25

Quiz App Project

A complete quiz: questions as data, one question at a time, answer checking, a 15-second timer, score and result screen — live.

Read the notes Video
Lesson 3.26

Regular Expressions — Text Ki Super Talaash

Search text like a machine: what regex is in plain words first, then patterns in JavaScript — character classes, anchors, quantifiers, test/match/replace.

Read the notes Video