JavaScript Foundations: Variables, Functions, Arrays & the DOM
Learn JavaScript by running real code in your head: variables, types, conditions, loops, functions, arrays, objects, DOM selection, events and a small cart app, with every answer checked as you go.
- One-time payment
- Instant access right after payment
- Secure checkout with Stripe
About this course
In this beginner course you learn JavaScript by thinking like the engine. Every lesson is a lab: a short script sits next to its data, and you work out what each variable holds, how often a loop runs, what a function returns or which elements a selector matches, with every answer checked instantly. You cover variables and types, string and number pitfalls, == versus ===, if/else and switch, while and for loops, functions, closures, arrays with map, filter and reduce, objects and references, selecting and changing the DOM, events and debugging. The course ends with a small cart app capstone, a 15-question exam and a certificate. The first lesson is free.
Lessons
- Variables & Values: Read Your First Script Like the EngineFree
- Numbers & Operators: Division, Remainder and Rounding Locked
- Strings: Indexes, slice() and Template Literals Locked
- Types & Coercion: Strings vs Numbers, == vs === Locked
- Decisions: if, else if, else and Logical Operators Locked
- switch, break and the Ternary Operator Locked
- while Loops: Repeat Until a Condition Changes Locked
- for Loops: Counters, Steps and Off-by-One Errors Locked
- Functions: Parameters, Defaults and return Locked
- Scope and Closures: Functions That Remember Locked
- Arrays: Indexes, length, push, pop, shift and unshift Locked
- map and filter: Transform and Select with Arrow Functions Locked
- reduce, find, findIndex and the sort() Trap Locked
- Objects: Properties, Spread Copies and References Locked
- Arrays of Objects: filter, map and reduce Pipelines Locked
- The DOM: Selecting Elements with CSS Selectors Locked
- Changing the Page: textContent, classList and createElement Locked
- Events: Listeners, Handlers and State Locked
- Debugging: Reading Errors and Fixing Classic Bugs Locked
- Capstone: Run the Fernbrook Cart Mini App Locked