JavaScript course
The language of the web: pages, Node.js servers, Electron desktop apps and React Native mobile apps.
In DMarlon Studio, JavaScript is the language of the Electron + React, Next.js, React, Vue, HTML, Chrome extension and React Native targets: the studio generates the UI and you write the logic.
Basic JavaScript course
20 lessonsFrom scratch: everything you need to write your first programs.
- 1Hello, worldYour first JavaScript program: console.log() writes text and results to the console. Run it with Node.js in DMarlon Studio.Lesson 1
- 2let, const and data typesStore values in variables with let and const, and use typeof to discover JavaScript's data types: strings, numbers, booleans, undefined and null.Lesson 2
- 3Numbers and MathDo maths in JavaScript: operators, the remainder with %, powers, rounding with toFixed and the functions of the Math object, with practical examples.Lesson 3
- 4Strings and template literalsWork with text in JavaScript: joining strings, template literals with backticks and ${}, length, characters, upper case and searching.Lesson 4
- 5if / else and the ternaryMake decisions in JavaScript with if, else if and else, and choose between two values on a single line with the ternary operator.Lesson 5
- 6Comparisons, logic and truthinessThe difference between === and == in JavaScript, the logical operators &&, || and !, and which values count as true or false (truthy and falsy).Lesson 6
- 7for and while loopsRepeat code in JavaScript with for and while: times tables, growing savings, break, continue and a countdown.Lesson 7
- 8Arrays: lists of valuesStore lists in JavaScript arrays: indexes from 0, length, changing elements, looping with for and for...of, and arrays of arrays.Lesson 8
- 9Adding, removing and searchingThe basic JavaScript array methods: push, pop, shift, unshift, includes, indexOf, slice and splice, with a shopping list and a queue.Lesson 9
- 10ObjectsGroup data in JavaScript objects: key: value properties, dot and bracket access, adding and deleting, Object.keys, for...in and arrays of objects.Lesson 10
- 11Functions and arrow functionsReuse code with functions in JavaScript: function declarations, values with return, arrow functions and functions as values.Lesson 11
- 12Parameters, defaults and returnMore on JavaScript functions: parameters with default values, return to exit early, undefined, rest parameters and returning an object.Lesson 12
- 13forEach, map and filterLoop over and transform JavaScript arrays without manual loops: forEach for each element, map to build a new array and filter to keep just a few.Lesson 13
- 14reduce, find, some and everySummarise and search JavaScript arrays: reduce to add up or group, find and findIndex to locate, some and every to check.Lesson 14
- 15String methodsClean and format text in JavaScript with trim, split, join, replace, replaceAll, padStart, padEnd, slice, indexOf and repeat.Lesson 15
- 16Destructuring and spreadUnpack values from arrays and objects with JavaScript destructuring, and copy or combine data with the spread operator (...).Lesson 16
- 17JSON: stringify and parseTurn JavaScript objects into JSON text with JSON.stringify and get them back with JSON.parse, to save a game or read data from a server.Lesson 17
- 18Errors: try, catch and throwHandle errors in JavaScript: catch failures with try/catch, use finally, and throw your own errors with throw, Error and RangeError.Lesson 18
- 19Reading what is typedRead data from standard input in JavaScript with Node.js and fs.readFileSync(0), and turn it into a grade report.Lesson 19
- 20Project: a to-do listA small JavaScript project that brings it all together: a to-do list driven by text commands, with objects, arrays, functions, errors and JSON.Lesson 20
Advanced JavaScript course
20 lessonsFor those who know the basics: the techniques used in real projects.
- 1Scope and closuresLearn what variable scope means in JavaScript and how a closure keeps private data between calls, using order and invoice counters.Lesson 1
- 2this, bind, call and applyUnderstand what this points to in JavaScript and how to pin it down with bind, call and apply, using a shopping cart as the example.Lesson 2
- 3Prototypes and the chainSee how JavaScript inheritance really works: prototypes, Object.create, constructor functions and the chain that ends in null.Lesson 3
- 4Classes and inheritanceWrite JavaScript classes with a constructor, chainable methods and inheritance through extends and super, using bank accounts.Lesson 4
- 5Getters, setters and private fieldsProtect object state in JavaScript with # private fields, validate values with setters and compute properties with getters.Lesson 5
- 6Static members and SymbolUse static in JavaScript for class-wide counters and factory methods, and Symbol for unique keys and custom object conversion.Lesson 6
- 7Iterators and generatorsProduce values on demand in JavaScript with function* and yield, and make your own objects work with for...of through Symbol.iterator.Lesson 7
- 8Map, Set and WeakMapGroup and count data in JavaScript with Map and Set, and attach information to objects without touching them using WeakMap.Lesson 8
- 9Higher-order functions and compositionBuild JavaScript functions that take and return functions: pipe, compose, logging wrappers and combinable rules for your orders.Lesson 9
- 10Currying and memoizationFix arguments step by step with currying and skip repeated work with memoization in JavaScript, using prices and Fibonacci.Lesson 10
- 11PromisesLearn how JavaScript promises work: resolve and reject, then chains, catch for errors and finally for clean-up.Lesson 11
- 12async and awaitWrite asynchronous JavaScript that reads top to bottom with async and await, and handle its errors with try/catch.Lesson 12
- 13Promise.all, allSettled and raceRun several async tasks at once in JavaScript and combine their results with Promise.all, allSettled, race and any.Lesson 13
- 14The event loopUnderstand the order in which Node runs JavaScript: synchronous code, microtasks (promises, nextTick) and macrotasks (setTimeout).Lesson 14
- 15The module pattern and IIFEsHide internal state in JavaScript with IIFEs and the module pattern, and see how Node wraps each file and what module.exports exports.Lesson 15
- 16Custom errors and finallyCreate your own JavaScript error classes with extends Error, chain the original cause and always release resources with finally.Lesson 16
- 17Regular expressionsParse a log in JavaScript with regular expressions: named groups, test, matchAll, replace with a function and email validation.Lesson 17
- 18Proxy and ReflectIntercept reads, writes and deletes in JavaScript with Proxy, and let Reflect do the default behaviour, using a validated user object.Lesson 18
- 19Events with EventEmitterConnect parts of a Node program with EventEmitter: emit, on, once, multiple listeners and the special error event.Lesson 19
- 20Project: an order queueFinal JavaScript project: an order queue that combines classes with private fields, EventEmitter events and async/await processing.Lesson 20