FSWD · MERN Stack · The pages come alive
Unit 1 built the body; this unit gives it a brain. Modern JavaScript from your very first console.log() to a form that genuinely refuses bad input — variables, objects, the DOM, arrays at real scale, strings, regex shapes, functions, and events.
Your 10 sessions, in order
Unit 2 runs in two rounds. Same rhythm as Unit 1 — four classroom sessions, then a hands-on lab in your own project folder. No new folder this unit: the same poshtik-campus/ you've been growing since Lab 1 simply gains its script.js.
Your order form currently accepts anything — even an empty name. What JavaScript actually does, what "ES6" means, the script tag, and your first console.log() seen live in DevTools. script.js is created inside your project folder.
14CLASS Variables & Data Typeslet, const — and why this course avoids var (you'll watch it misbehave first). Strings, numbers, booleans, undefined, null, typeof, and a first taste of template literals. Includes the legacy with statement at read-only depth, because the exam asks about it.
15CLASS ObjectsA dish's name, price and category belong together — objects keep them together. Literal syntax, dot vs bracket access, methods, and nested objects like a dish's nutrition facts.
16CLASS Document & Window Objects — the DOMThe browser's live, editable model of your HTML. Selecting one element, selecting all twenty dish cards at once, changing text and styles from code — and diagnosing the classic "Cannot set properties of null" from a typo'd id.
LABFOUR JavaScript Meets the Order FormBack in your own poshtik-campus/ folder: script.js learns to read your form. Three flagship dishes modelled as an array of objects, and a button that reads name, dish and quantity into the console.
The full Poshtik menu — every dish, English and Telugu names together — becomes one array, poshtikMenu. Loops, forEach, map, filter — then the sort trap (10 before 2?!) and its comparator fix, and reduce for order totals.
SOONCase, trim (the classic "why did my validation fail" bug), includes, split, template literals in full — then the honest limit: includes('@') happily accepts "@@@". Enter regular expressions: describing a string's shape, built up to a real VCE-email pattern.
SOONDeclarations formalised, function expressions, arrow functions (your map/filter callbacks, seen through a new lens), default parameters — and one reusable validateField(), the exact building block Lab 5 needs.
SOONClicks, keystrokes, submits. addEventListener, the event object, preventDefault — then the full worked submit-validation across every order-form field. Closes with Build-It-Twice: feeling how much manual DOM work twenty dishes took. Hold that thought for Unit 3.
SOONBack in your own poshtik-campus/ folder: script.js builds all ten dish cards from poshtikMenu, then checks every order on submit — trimmed name, 10-digit phone, a dish picked, a whole-number quantity — with red messages beside each field and no page reload.
The running project · same folder, new powers
Poshtik Campus పౌష్టిక్ క్యాంపస్ · no new folder this unit
Everything you built in Unit 1 stays exactly where it is. The menu page you styled in Lab 3 becomes the testing ground for DOM selection at real scale, the order form from Lab 2 becomes the thing your validation protects, and every dish photo already in your images/ folder gets rendered onto the page by your own JavaScript instead of hand-written HTML.
script.js created in Class 13, linked from every page, growing all unit — the single file every later session extendsposhtikMenu — the full bilingual dish catalogue as one array of objects (Class 17), rendered onto the page dynamically in Lab 5This form is genuinely live — every rule it just ran on you (.trim(), Number(), the > 0 check) is written line by line in your own script.js by Lab 5.