Skip to content
WANCODE
BM

▍Learn / JavaScript

Make Websites Come Alive

Learn the fundamentals of programming with JavaScript: values, conditions, functions, arrays, objects and loops — then use the DOM and events to build an interactive calculator.

12 published lessons 3.1 hBeginner

Start the track

Free to start. No signup required.

  1. 01What Is JavaScript?Meet the language that makes web pages do things: connect a script, print to the console, write comments and read your first error message.
  2. 02Variables and Data TypesStore values in named boxes with let and const, meet the five basic data types, and use typeof to check what you're holding.
  3. 03Numbers and OperatorsDo real maths with JavaScript: operator order, remainders, += and ++, NaN, the 0.1 + 0.2 surprise, and showing Ringgit amounts properly.
  4. 04Strings and TemplatesWork with text: quotes, joining strings, template literals, and the everyday methods length, toUpperCase, includes, slice and trim.
  5. 05Conditions: Making DecisionsTeach your code to choose: compare values with ===, branch with if / else if / else, combine conditions with && || !, and meet truthy, falsy and the ternary.
  6. 06FunctionsPackage instructions into reusable functions: parameters and arguments, return vs console.log, arrow functions and the basics of scope.
  7. 07Arrays: Keeping Lists of ThingsStore many values in one variable, read them by index, add and remove items, and transform whole lists with map and filter.
  8. 08Objects: Grouping Related DataDescribe real things with objects: read properties with dot and bracket notation, nest data, and work with arrays of objects.
  9. 09Loops: Repeat Without Copy-PasteRepeat work with for, for...of and while loops, control them with break and continue, and learn to spot (and fix) an infinite loop.
  10. 10Understanding the DOM: JavaScript Meets the PageSee the page as a tree of objects, then find elements, change their text and classes, and create new elements — safely.
  11. 11Events: Making Pages React to PeopleListen for clicks, typing and form submissions, read the event object, stop forms reloading the page, and use bubbling to handle many elements with one listener.
  12. 12Build an Interactive CalculatorPut it all together: keep state in variables, separate logic from the page, wire up buttons, handle division by zero and add keyboard support.