Who Is This Course For?
Built for complete beginners and manual testers who want to break into automation. You will learn JavaScript the way a professional uses it — with the Node.js runtime, a real code editor, and industry-standard tools. By the end you will have both the language skills and the test automation experience that employers look for.
01
Introduction & Setup
Days 1–2 | Node.js, VS Code, and your first program
What You Will Learn
- Install
Node.jsand VS Code; understand what each does - Run your first
console.log()and see it in the terminal - Understand JavaScript as an interpreted language vs compiled languages
- Know why Node.js lets you run JS outside a browser
- Execute a
.jsfile usingnode filename.js - Add single-line and multi-line comments to your code
- Understand the JavaScript engine's read-execute cycle
- Confirm your environment is fully ready before moving on
02
Variables & Data Types
Days 3–4 |
var, let, const, primitives & objectsWhat You Will Learn
- Declare variables with
var,let, andconst— and know when to use each - Work with primitive types:
number,string,boolean,undefined,bigint,symbol,null - Create non-primitive types: objects
{}and arrays[] - Understand stack vs heap memory — where values live
- Use template literals for clean, readable string formatting
- Check a variable's type at runtime with
typeof - Understand why
nullis a deliberate "nothing" andundefinedis an accident - Avoid the most common beginner data-type bugs
03
Operators
Days 4–5 | Arithmetic, comparison, logical, and modern operators
What You Will Learn
- Use arithmetic operators
+ − * / % **for calculations - Shorthand assignment:
+= −= *= /=and increment/decrement++ −− - Compare values with
==(loose) vs===(strict) — and why strict matters - Combine conditions with
&&,||, and! - Write a one-line decision with the ternary operator
? : - Use
??(nullish coalescing) as a default-value guard - Use
?.(optional chaining) to read nested values safely without crashing - Spread values
...to copy or merge arrays and objects in one go
04
Conditions
Days 6 & 12 |
if/else, switch, falsy values, and short-circuit logicWhat You Will Learn
- Write
if / else if / elseblocks to branch your program's path - Use a
switchblock to handle many fixed choices cleanly - Understand JavaScript's falsy values:
0,"",null,undefined,NaN,false - Use short-circuit evaluation — stop checking once the answer is clear
- Know when to use strict equality
===in conditions to avoid type coercion - Nest conditions correctly without creating hard-to-read pyramids
- Predict what your program will do before running it
- Avoid the single most common condition-writing mistake in JavaScript
05
Loops
Days 7–10 |
for, while, for...of, forEach, nested loopsWhat You Will Learn
- Repeat a block of code a fixed number of times with a
forloop - Keep repeating until a condition becomes false with
while - Guarantee at least one run with
do...while - Walk through every item in an array with
for...of - Loop through object keys with
for...in - Use the
forEach()array method for cleaner list iteration - Build nested loops to process grids and two-dimensional data
- Choose the right loop type for arrays, objects, and sets
06
User Input & Loop Control
Days 11–12 |
prompt-sync, break, continue, returnWhat You Will Learn
- Accept keyboard input at runtime using the
prompt-syncpackage - Install a Node.js package with
npmand import it correctly - Use
breakto exit a loop the moment you find what you need - Use
continueto skip one iteration without stopping the loop - Use
returnto exit a function early and pass back a value - Build a simple interactive command-line menu
- Understand the difference between pausing a step and ending the loop
- Combine input and control flow to write logic-driven programs
07
Functions Part 1
Days 13–14 | Declaration, parameters, rest/spread, IIFE
What You Will Learn
- Define a named, reusable block of code using
functiondeclaration - Pass values in as parameters and send results back with
return - Provide default parameter values when no argument is supplied
- Accept any number of arguments using rest parameters
...args - Store a function in a variable with a function expression
- Write an IIFE (Immediately Invoked Function Expression) for one-off setup code
- Understand scope — which code can see which variables
- Write clean, reusable helpers that keep your scripts short and readable
08
Functions Part 2
Days 14–16 | Arrow functions, callbacks, higher-order functions, recursion
What You Will Learn
- Write compact functions using arrow syntax
() => {} - Pass a function as an argument into another function (callback pattern)
- Build higher-order functions that accept or return other functions
- Write a recursive function that calls itself to break a problem into steps
- Visualise the call stack (LIFO) to understand the order of execution
- Understand why arrow functions handle
thisdifferently from regular functions - See how callbacks power
forEach,filter,map, and Playwright event handlers - Recognise these patterns instantly in any modern JavaScript codebase
09
OOP — Classes & Objects
Days 17–19 |
class, constructor, this, static vs instance membersWhat You Will Learn
- Define a class — a blueprint for creating objects
- Create objects from a class using the
newkeyword - Use the
constructor()to give each object its own starting values - Use
thisinside a class to refer to the current object - Write instance methods — actions that belong to one specific object
- Write static methods — utilities that belong to the class itself, not any object
- Model a real-world thing (e.g. a user account or a web page) as a class
- Understand how the Page Object Model pattern is built on classes
10
Encapsulation & Inheritance
Day 20 | Private
#fields, getters/setters, extends, super()What You Will Learn
- Declare private fields with
#fieldNameso only the class can access them - Provide controlled read/write access with
getandsetaccessors - Create a child class that inherits all properties and methods of a parent with
extends - Call the parent class's constructor using
super() - Add unique features to a child class without touching the parent
- Understand single, multilevel, and hierarchical inheritance patterns
- Explain encapsulation in plain words in an interview
- Apply inheritance to build a base test class all your test files extend
11
Polymorphism & OOP Pillars
Day 21 | Method overriding, all four OOP pillars
What You Will Learn
- Override a parent class method in a child class with a different implementation
- Write code that works with any subtype without knowing exactly which one it is
- Understand the four pillars: Encapsulation, Abstraction, Inheritance, Polymorphism
- Give a clear, real-world example of each pillar in an interview setting
- See how all four pillars work together in a professional test framework
- Write a mini framework demo that uses all four concepts
- Understand why test frameworks are built OOP-style and not just with functions
- Feel completely confident in any object-oriented interview question
12
Object Creation & JSON
Day 22 | 4 creation patterns,
?., ??, destructuring, spreadWhat You Will Learn
- Create objects four ways: literal
{}, constructor function,Object.create(), andclass - Convert objects to JSON strings with
JSON.stringify()and back withJSON.parse() - Read deeply nested values safely with optional chaining
?. - Set fallback values with nullish coalescing
?? - Unpack object properties into named variables with destructuring
const {a, b} = obj - Copy and merge objects cleanly with the spread operator
...obj - Understand how API responses are structured and how to read them safely
- Use these techniques in data-driven test configurations
13
Built-in Methods — Strings, Arrays, Map & Set
Days 23–26 | 20+ string methods, array callbacks, Map, Set
String Methods (20+)
toUpperCase() / toLowerCase()— change letter casetrim() / trimStart() / trimEnd()— remove whitespaceslice() / substring()— extract part of a stringincludes() / startsWith() / endsWith()— check for contentreplace() / replaceAll()— swap textsplit()— break a string into an arrayindexOf() / lastIndexOf()— find position of textrepeat() / padStart() / padEnd()— formatting helpers
Array Methods (basic + callbacks)
push() / pop() / shift() / unshift()— add and remove itemsfilter()— keep only items that pass a test functionmap()— transform every item into something newreduce()— combine all items into one resultsort()— order items by a custom rulefind() / findIndex()— locate the first matching itemsome() / every()— check if any or all items pass a testflat() / flatMap()— flatten nested arrays
Map & Set
- Use
Mapfor key-value storage that remembers insertion order - Use
Setfor a list that automatically removes duplicates - Iterate Map and Set with
for...of - Choose between Object, Array, Map, and Set for each use case
14
Exception Handling & Async JavaScript
Days 27–28 |
try/catch, Promises, async/await, Playwright .spec.jsWhat You Will Learn
- Wrap risky code in
try/catchto prevent a crash from stopping the whole test run - Run a guaranteed clean-up block with
finally - Identify error types:
TypeError,ReferenceError,SyntaxError,RangeError - Create custom error classes to describe domain-specific failures
- Start an async task and attach
.then()/.catch()callbacks — the Promise pattern - Write async code that reads like synchronous steps using
async/await - Run multiple async tasks in parallel with
Promise.all() - Write a complete Playwright
.spec.jstest file that automates a real website
Interview Prep
var vs let vs const — what is the real difference?var ignores block scope and is function-scoped, which causes bugs. let is block-scoped and mutable. const is block-scoped and cannot be reassigned. Always prefer const, use let only when the value must change, and avoid var.== vs === — why does it matter?== converts types before comparing, so "5" == 5 is true — a hidden surprise. === compares value AND type with no conversion, so "5" === 5 is false. Always use === in assertions.Callbacks vs Promises vs
async/await — when do you use each?Callbacks are the oldest pattern and nest badly. Promises chain cleanly with
.then(). async/await is Promises with synchronous-looking syntax — the standard in modern automation. Playwright uses async/await throughout.What are the four pillars of OOP?
Encapsulation hides internal details. Inheritance shares behaviour between classes. Abstraction exposes only what is needed. Polymorphism allows one interface to work with multiple types. All four appear in every professional JS framework.
What is the difference between
map() and filter()?map() returns a new array of the same length where every item has been transformed. filter() returns a new array that may be shorter — it only keeps items where your function returns true.What does
this refer to inside a class method?this refers to the specific object the method was called on — not the class itself. Each object gets its own copy of the data but shares the method code. Arrow functions inside a class inherit this from the outer scope instead of creating their own.