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.
JavaScript Notes
26 LESSONS · CODE SCOPE SERIES 3.1–3.26The 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.
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.
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.
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.
Operators
Doing the maths and making comparisons: arithmetic, assignment, the === golden rule, logical operators, and decisions built from combos.
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.
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.
Functions
Reusable machines for your code: declaring and calling, parameters vs arguments, return values, expressions, scope's wall, and a real form validator.
Arrays
One name, many boxes: indexes from zero, length, changing items, push/pop/shift/unshift, and loops that turn arrays into page content.
Objects
Data with named boxes: properties, dot vs bracket, changing and deleting, methods and this, objects inside arrays, and for...in.
Destructuring & Spread
Unpack values in one line: object and array destructuring, defaults, renaming, swaps, the ... spread copy, joining arrays and rest.
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.
Strings & Template Literals
Text done right: quotes vs backticks, ${} placeholders, calculations inside strings, length and indexes, case, search, slice and split.
DOM: Selecting & Changing Elements
Reach into the page: the DOM tree, getElementById, querySelector, textContent, styles and classList — and innerHTML's danger warning.
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.
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.
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.
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.
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.
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.
Callbacks → Promises
Waiting without freezing: callbacks and their pyramid of doom, the Promise and its three states, .then/.catch and chaining that reads clean.
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.
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.
Error Handling & localStorage
Apps that survive mistakes: try/catch/finally, throw, and localStorage — saving data in the browser so a refresh loses nothing.
Todo App Project
The whole series in one app: add, complete and delete tasks, clean rendering, and localStorage persistence proven with a refresh test.
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.
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.