JavaScript - The Tricky Parts

JavaScript is amazing but it has some "quirks and features". In this course, we'll dive into 'this', closures, recursion, hoisting, scopes and much, much more!

JavaScript - The Tricky Parts

Course Overview

About This Course

You already know JavaScript—but every now and then it still surprises you. A loop behaves “weirdly”, this points somewhere you didn’t expect, or a value changes because it wasn’t really a value at all. Those moments slow you down and make debugging feel like guesswork.

In this course, you’ll zoom in on the parts that most often cause confusion and errors, and you’ll get explanations that focus on the underlying reasons things behave the way they do. Each section is short, focused, and built to stand on its own, so you can either follow along or jump in when you need a fast, reliable reference.

By the end, you’ll be able to predict how JavaScript will execute code in these edge cases, avoid common traps before they happen, and explain the “why” behind the behavior—so your fixes are confident, not accidental.

What You'll Learn

You’ll get clear, practical mastery of the JavaScript behaviors that most often cause bugs—explained with focused examples you can revisit anytime.

  • Control scope behavior

    Trace how scope and hoisting affect what’s accessible where, and predict when variables and functions are available during execution so you can prevent hard-to-spot reference and timing issues.

  • Use callbacks correctly

    Write callback-based code without accidental early execution by distinguishing indirect vs direct function execution, and structure your functions so the right code runs at the right time.

  • Reason about values

    Decide when you’re working with primitive vs reference values, and anticipate how assignments and mutations behave so you don’t accidentally change data in multiple places.

  • Handle types safely

    Recognize where value types and type coercion can silently change results, and write code that avoids surprising comparisons and conversions that lead to subtle logic bugs.

  • Master closures and recursion

    Implement closures intentionally (instead of stumbling into them) and apply recursion with confidence, understanding what gets remembered across calls and how execution flows through repeated function invocations.

  • Tame async JavaScript

    Choose between callbacks, Promises, and async/await to express asynchronous code clearly, and understand how execution order works so your logic stays predictable even when timing doesn’t.

Ready to get started?

See enrollment options

Prerequisites

  • You should already have working JavaScript knowledge—this is not a beginner course.

Who Is This Course For?

  • Working JS developers

    You write JavaScript regularly, but certain behaviors still feel inconsistent or “magical.” This course helps you replace trial-and-error debugging with a mental model you can trust.

  • Self-taught learners

    You can build things in JavaScript, yet some core concepts never fully clicked. You want explanations that finally make the confusing parts stick—without rewatching an entire general JS course.

  • Interview prep learners

    You’re comfortable coding, but tricky JavaScript questions expose gaps in understanding. You want to be able to explain what’s happening and why, not just memorize answers.

Curriculum Overview

Start Now

Preview the structure and pacing of this course before you begin.

  • Getting Started6 lectures10m
    • 01Welcome to the Course!1:53 min
    • 02About this Course5:14 min
    • 03Course Requirements & Info1:39 min
    • 04How To Take This Course2:05 min
    • 05Join the Learning Community0:00 min
    • 06The Academind Pro Referral Program0:00 min
  • Scopes & Hoisting20 lectures1h 24m
    • 01Module Introduction0:30 min
    • 02Getting Started2:39 min
    • 03Scope in Theory2:31 min
    • 04Introducing Global and Local (Function) Scope4:07 min
    • 05How Scope Works6:47 min
    • 06Getting to Know "Block Scope"7:56 min
    • 07Scope Overview1:44 min
    • 08Special Cases11:02 min
    • 09The Global Object7:11 min
    • 10Scope Across Files4:13 min
    • 11Modules & Scope7:53 min
    • 12Variable Shadowing3:54 min
    • 13Quiz: Scope0:00 min
    • 14What is "Hoisting"?4:00 min
    • 15Hoisting in Action7:32 min
    • 16Hoisting Inside Of Functions3:05 min
    • 17"let" & "const" and Hoisting5:57 min
    • 18Hoisting Precedence3:12 min
    • 19Quiz: Hoisting0:00 min
    • 20Module Resources0:00 min
  • Direct vs Indirect Function Execution (Callbacks & Events)8 lectures21m
    • 01Module Introduction0:34 min
    • 02Direct vs Indirect Function Execution2:38 min
    • 03Direct Execution in Action3:30 min
    • 04Indirect Execution in Action4:53 min
    • 05Indirect Execution With Anonymous Functions2:24 min
    • 06Indirect Execution and Passing Arguments7:49 min
    • 07Quiz: Direct vs Indirect Function Execution0:00 min
    • 08Module Resources0:00 min
  • Loops9 lectures28m
    • 01Module Introduction0:21 min
    • 02Loops Overview3:23 min
    • 03The "for" Loop6:09 min
    • 04The "for" Loop with "let"2:46 min
    • 05The "for ... in ..." Loop7:04 min
    • 06The "for ... of ..." Loop5:09 min
    • 07Using forEach()4:04 min
    • 08Quiz: Loops0:00 min
    • 09Module Resources0:00 min
  • Primitive vs Reference Values12 lectures51m
    • 01Module Introduction0:39 min
    • 02What are "Primitive" and "Reference Values"?7:03 min
    • 03Primitive Values in Action6:27 min
    • 04Reference Values in Action3:00 min
    • 05Behind the Scenes2:32 min
    • 06Immutability vs Mutability2:35 min
    • 07Primitive Wrapper Objects4:37 min
    • 08"const" & Mutation5:32 min
    • 09Reference Value Equality6:06 min
    • 10Copying Reference Values13:01 min
    • 11Quiz: Primitive vs Reference Values0:00 min
    • 12Module Resources0:00 min
  • Types & Type Coercion21 lectures1h 47m
    • 01Module Introduction0:45 min
    • 02What's Special About Types in JavaScript?3:17 min
    • 03What is "Coercion"?5:48 min
    • 04How Operators Influence Types & Coercion6:14 min
    • 05Coercion Rules9:38 min
    • 06Arithmetic Operators & Basic Comparisons7:29 min
    • 07Comparison Operators for Booleans & Coercion5:59 min
    • 08Truthy and Falsy Values4:58 min
    • 09Boolean Return Values4:45 min
    • 10Explicit Boolean Coercion with the Double Bang Operator3:46 min
    • 11Semi-explicit Value Coercion2:57 min
    • 12The Special Case of "null"7:18 min
    • 13More on null, undefined and NaN4:10 min
    • 14Objects & Arrays - Coercion Theory3:41 min
    • 15Objects & Arrays - Coercion in Action5:18 min
    • 16Objects & Comparisons6:12 min
    • 17Explicit Object Coercion4:08 min
    • 18Implicit Number Coercion for Objects2:33 min
    • 19Wrap Up1:47 min
    • 20Quiz & Time to Practice16:29 min
    • 21Module Resources0:00 min
  • Recursion7 lectures49m
    • 01Module Introduction0:47 min
    • 02What is "Recursion"?8:36 min
    • 03A Look Under The Hood11:45 min
    • 04Analyzing Recursion with the Browser DevTools7:28 min
    • 05Where Recursion Shines20:52 min
    • 06Quiz: Recursion0:00 min
    • 07Module Resources0:00 min
  • Closures8 lectures26m
    • 01Module Introduction0:47 min
    • 02Closures in Theory4:15 min
    • 03Closures in Practice2:27 min
    • 04Multiple Environments & Closures3:22 min
    • 05How Closures Actually Work5:39 min
    • 06A Special Case9:37 min
    • 07Quiz: Closures0:00 min
    • 08Module Resources0:00 min

And 3 more sections in the full course.

Ready to Get Started?

Choose the option that works best for you.

Single Course

JavaScript - The Tricky Parts

One Payment. Lifetime Access.

$89one-time

  • One-time payment
  • All future updates for this course
  • Downloadable resources & code
  • Certificate of completion
  • Hands-on exercises & projects
  • Self-paced learning
  • English captions on all videos
  • Lifetime access