Free Online Course · Self-paced
Modern JavaScript Tutorial (ES6+ Hands-On)
Free, hands-on JavaScript tutorial - strings, numbers, arrays, objects, ES6+ features, classes, async/await, the DOM, error handling, and common error fixes. 75+ runnable lessons covering modern JavaScript. Each linked article states what to expect when you run its snippets in Node or the browser.
- 122 parts
- ~418 min total
- Beginner to Intermediate
- Updated Jun 2026
JavaScript is the only language that runs natively in every browser, and increasingly the most popular language on servers (via Node.js) too. This tutorial covers modern JavaScript - ES6 and later - the way you will actually write it in real codebases. We skip the legacy quirks where possible and focus on idiomatic, current syntax.
We start with strict mode in JavaScript, scope, and the equality rules (== vs ===), then walk through every core data type (numbers, strings, arrays, objects), modern syntax (arrow functions, template literals, destructuring, spread, nullish coalescing), classes and design patterns, async with Promises and async/await, DOM manipulation, error handling, and finally a chapter dedicated to fixing the most common JavaScript errors you will hit. Every snippet runs in the browser console or Node.js REPL with zero setup.
The chapter list on this page is the full course index: every JavaScript lesson is linked here. On other JavaScript pages, the sidebar shows a shorter spine of core topics in learning order so navigation stays light; use this hub whenever you need the complete list—including method deep-dives, jQuery, design patterns, and troubleshooting fixes.
Click Start the course to begin, or jump to the chapter you need - Arrays, Async, and DOM Manipulation are the most-bookmarked. When you finish, the next course is /nodejs-tutorial/ for server-side JavaScript.
What you'll learn
- Write modern ES6+ JavaScript - let/const, arrow functions, template literals, destructuring, spread
- Work fluently with strings, numbers, arrays, and objects using the right method for each job
- Build classes with inheritance and apply singleton / observer / mediator patterns correctly
- Handle async code with Promises, async/await, and chained then() without footguns
- Manipulate the DOM, handle events, and build interactive UIs without a framework
- Debug the most common JavaScript errors (call stack, undefined, module imports, headers)
Prerequisites
- Any modern browser (Chrome/Firefox/Edge) with DevTools
- Node.js LTS installed (optional but recommended for running snippets)
- Basic HTML/CSS knowledge for the DOM chapter
Syllabus
14 chapters · 122 lessons · ~418 min of reading
-
2 Numbers and Math 15 lessons
- Part 6 Math.abs() 2 min read
- Part 7 Math.ceil() 2 min read
- Part 8 Math.floor() 2 min read
- Part 9 Math.pow() and exponents 2 min read
- Part 10 Exponentiation in JavaScript 5 min read
- Part 11 Number.toFixed() 2 min read
- Part 12 Math.random() 3 min read
- Part 13 Math.sqrt() 2 min read
- Part 14 Math.max() 2 min read
- Part 15 Math.min() 2 min read
- Part 16 Math.cbrt() 2 min read
- Part 17 Math.fround() 2 min read
- Part 18 Round down a number 2 min read
- Part 19 Integer division 8 min read
- Part 20 <= operator 2 min read
-
3 Strings 17 lessons
- Part 21 Template literals (backticks) 3 min read
- Part 22 String.includes() - contains check 2 min read
- Part 23 String.startsWith() 2 min read
- Part 24 String.trim() 2 min read
- Part 25 String.toLowerCase() 2 min read
- Part 26 String.indexOf() 4 min read
- Part 27 Replace a substring 3 min read
- Part 28 String.replaceAll() 2 min read
- Part 29 replaceAll() with regex patterns 2 min read
- Part 30 String.trimEnd() 2 min read
- Part 31 Variables inside regex patterns 2 min read
- Part 32 Convert SRT subtitles to plain text 4 min read
- Part 33 Remove the last character of a string 3 min read
- Part 34 Convert a string to an array 5 min read
- Part 35 Compare strings 6 min read
- Part 36 Check if a string is a number 5 min read
- Part 37 Validate an email address 2 min read
-
4 Arrays 16 lessons
- Part 38 Add an item to an array 4 min read
- Part 39 Array.pop() 3 min read
- Part 40 Array.unshift() 3 min read
- Part 41 Slice an array 4 min read
- Part 42 slice() method reference 2 min read
- Part 43 Array.splice() 2 min read
- Part 44 Array.join() 6 min read
- Part 45 Copy an array 6 min read
- Part 46 Remove duplicates from an array 2 min read
- Part 47 Remove a specific element 2 min read
- Part 48 Flatten a nested array 4 min read
- Part 49 Check if an array is empty 4 min read
- Part 50 Spread operator (...) 2 min read
- Part 51 Sort an array 2 min read
- Part 52 Array.findIndex() 4 min read
- Part 53 Set and HashSet-style uniqueness 4 min read
-
5 Data structures, DOM utilities, and patterns 7 lessons
- Part 54 Linked list implementation 4 min read
- Part 55 Infinite loops (intentional and accidental) 4 min read
- Part 56 XOR operator and bitwise patterns 2 min read
- Part 57 Create and manipulate SVG 2 min read
- Part 58 Detect ad blockers in the browser 5 min read
- Part 59 Simulate Tab key events 2 min read
- Part 60 Conditional logic with jQuery 2 min read
-
6 Objects, JSON, Destructuring 9 lessons
- Part 61 Object literals 4 min read
- Part 62 Check if a key exists in an object 7 min read
- Part 63 Object.hasOwnProperty() 4 min read
- Part 64 Clone an object 5 min read
- Part 65 Deep copy an object 7 min read
- Part 66 Merge objects 3 min read
- Part 67 Object and array destructuring 7 min read
- Part 68 JSON.stringify() with pretty-print 2 min read
- Part 69 JSON.parse() 2 min read
-
10 Async - Promises and async/await 10 lessons
- Part 85 async / await 4 min read
- Part 86 Promise.all() 2 min read
- Part 87 Promise.race() 4 min read
- Part 88 Promise.resolve() 3 min read
- Part 89 Promise.reject() 3 min read
- Part 90 Chain promises with .then() 2 min read
- Part 91 Wait for async work to finish 2 min read
- Part 92 setTimeout() 4 min read
- Part 93 Wait N seconds in JavaScript 2 min read
- Part 94 Run a function every second (setInterval) 4 min read
-
12 DOM Manipulation and Events 15 lessons
- Part 100 Get a DOM element 3 min read
- Part 101 querySelector / querySelectorAll 3 min read
- Part 102 Get and set textContent 3 min read
- Part 103 Element.replaceWith() 2 min read
- Part 104 Remove a DOM element 3 min read
- Part 105 Node.appendChild() 4 min read
- Part 106 Node.insertBefore() 4 min read
- Part 107 window.scrollTo() 2 min read
- Part 108 Redirect to a URL 3 min read
- Part 109 Open a new tab from JS 3 min read
- Part 110 addEventListener() 6 min read
- Part 111 Keyboard events 6 min read
- Part 112 Mouse events 3 min read
- Part 113 Event bubbling explained 4 min read
- Part 114 Copy to clipboard 4 min read
-
13 Error Handling 3 lessons
-
14 Common Errors and Troubleshooting 5 lessons
- Part 118 Fix: Cannot use import statement outside a module 6 min read
- Part 119 Fix: Maximum call stack size exceeded 2 min read
- Part 120 Fix: Cannot set headers after they are sent 8 min read
- Part 121 Fix: Objects are not valid as a React child 3 min read
- Part 122 Fix: ipython is not defined 5 min read

