W3docs

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!

Start course

JavaScript is an amazing programming language - and a very versatile one, too.

But it also can be tricky at times.

There are some concepts in JavaScript, that often lead to confusion and errors - that's exactly what we'll dive into in this course!

This course will explore the following "tricky parts" in depth AND in understandable words, so that you can use this course both as a reference you come back to in the future as well as a resource to strengthen your JavaScript knowledge:

  • Scope & Hoisting
  • Callback Functions (Indirect vs Direct Function Execution)
  • Loops (yes, they do contain some "weird" parts)
  • Primitive vs Reference Values
  • Value Types & Type Coercion
  • Recursion
  • Closures
  • Asynchronous Code (Callbacks, Promises, async/ await)
  • The "this" Keyword
  • Prototypes

Those concepts will be explained in detail and theory as well as in practice with short and concise code snippets and examples.

You will learn:-

  • What's tricky about those concepts
  • WHY it works the way it works
  • WHAT you should remember or keep in mind

Important: This course is NOT a course for beginners! JavaScript knowledge is expected!

But you don't have to be an expert or advanced user.

This course aims to help you understand those tricky concepts, it's also meant to be a resource you can dive into if you just want to look up one specific concept (instead of having to search through an entire JavaScript course).

Therefore, every course section is built such that it works standalone, independent from the other sections. There is no overarching course project or anything like that - instead, you get "to the point", focused sections that have the goal of making those "tricky parts" less tricky as quickly as possible!

Course content

Section 1Getting Started

  • Welcome to the Course!
    1:53
  • About this Course
    5:14
  • Course Requirements & Info
    1:39
  • How To Take This Course
    2:05
  • Join the Learning CommunityPremium
    1:00

Section 2Scopes & Hoisting

  • Module Introduction
    0:30
  • Getting Started
    2:39
  • Scope in Theory
    2:31
  • Introducing Global and Local (Function) Scope
    4:07
  • How Scope Works
    4:47
  • Getting to Know "Block Scope"
    7:56
  • Scope Overview
    1:44
  • Special Cases
    11:02
  • The Global Object
    7:11
  • Scope Across Files
    4:13
  • Modules & Scope
    7:53
  • Variable Shadowing
    3:54
  • Quiz: Scope
    1:00
  • What is "Hoisting"?Premium
    4:00
  • Hoisting in ActionPremium
    7:32
  • Hoisting Inside Of FunctionsPremium
    3:05
  • "let" & "const" and HoistingPremium
    5:57
  • Hoisting PrecedencePremium
    3:12
  • Quiz: HoistingPremium
    1:00
  • Module ResourcesPremium
    1:00

Section 3Direct vs Indirect Function Execution (Callbacks & Events)

  • Module IntroductionPremium
    0:34
  • Direct vs Indirect Function ExecutionPremium
    2:38
  • Direct Execution in ActionPremium
    3:30
  • Indirect Execution in ActionPremium
    4:53
  • Indirect Execution With Anonymous FunctionsPremium
    2:24
  • Indirect Execution and Passing ArgumentsPremium
    7:49
  • Quiz: Direct vs Indirect Function ExecutionPremium
    1:00
  • Module ResourcesPremium
    1:00

Section 4Loops

  • Module IntroductionPremium
    0:21
  • Loops OverviewPremium
    3:23
  • The "for" LoopPremium
    6:09
  • The "for" Loop with "let"Premium
    2:46
  • The "for ... in ..." LoopPremium
    7:04
  • The "for ... of ..." LoopPremium
    5:09
  • Using forEach()Premium
    4:04
  • Quiz: LoopsPremium
    1:00
  • Module ResourcesPremium
    1:00

Section 5Primitive vs Reference Values

  • Module IntroductionPremium
    0:39
  • What are "Primitive" and "Reference Values"?Premium
    7:03
  • Primitive Values in ActionPremium
    6:27
  • Reference Values in ActionPremium
    3:00
  • Behind the ScenesPremium
    2:32
  • Immutability vs MutabilityPremium
    2:35
  • Primitive Wrapper ObjectsPremium
    4:37
  • "const" & MutationPremium
    5:32
  • Reference Value EqualityPremium
    6:06
  • Copying Reference ValuesPremium
    13:01
  • Quiz: Primitive vs Reference ValuesPremium
    1:00
  • Module ResourcesPremium
    1:00

Section 6Types & Type Coercion

  • Module IntroductionPremium
    0:45
  • What's Special About Types in JavaScript?Premium
    3:17
  • What is "Coercion"?Premium
    5:48
  • How Operators Influence Types & CoercionPremium
    6:14
  • Coercion RulesPremium
    9:38
  • Arithmetic Operators & Basic ComparisonsPremium
    7:29
  • Comparison Operators for Booleans & CoercionPremium
    5:59
  • Truthy and Falsy ValuesPremium
    4:58
  • Boolean Return ValuesPremium
    4:45
  • Explicit Boolean Coercion with the Double Bang OperatorPremium
    3:46
  • Semi-explicit Value CoercionPremium
    2:57
  • The Special Case of "null"Premium
    7:18
  • More on null, undefined and NaNPremium
    4:10
  • Objects & Arrays - Coercion TheoryPremium
    3:41
  • Objects & Arrays - Coercion in ActionPremium
    5:18
  • Objects & ComparisonsPremium
    6:12
  • Explicit Object CoercionPremium
    4:08
  • Implicit Number Coercion for ObjectsPremium
    2:33
  • Wrap UpPremium
    1:47
  • Quiz & Time to PracticePremium
    16:29
  • Module ResourcesPremium
    1:00

Section 7Recursion

  • Module IntroductionPremium
    0:47
  • What is "Recursion"?Premium
    8:36
  • A Look Under The HoodPremium
    11:45
  • Analyzing Recursion with the Browser DevToolsPremium
    7:28
  • Where Recursion ShinesPremium
    20:52
  • Quiz: RecursionPremium
    1:00
  • Module ResourcesPremium
    1:00

Section 8Closures

  • Module IntroductionPremium
    0:47
  • Closures in TheoryPremium
    4:15
  • Closures in PracticePremium
    2:27
  • Multiple Environments & ClosuresPremium
    3:22
  • How Closures Actually WorkPremium
    5:39
  • A Special CasePremium
    9:37
  • Quiz: ClosuresPremium
    1:00
  • Module ResourcesPremium
    1:00

Section 9Asynchronous Code

  • Module IntroductionPremium
    0:38
  • What is "Async Code"?Premium
    5:24
  • JavaScript is Single-Threaded!Premium
    4:17
  • CallbacksPremium
    8:05
  • Another Callback ExamplePremium
    2:50
  • PromisesPremium
    5:35
  • Promises in ActionPremium
    11:14
  • Behind the Scenes of PromisesPremium
    8:04
  • Working with "then()"Premium
    5:06
  • Promisifying APIsPremium
    3:24
  • Handling ErrorsPremium
    10:16
  • Using "catch()"Premium
    2:59
  • Rejecting Promises - Behind the ScenesPremium
    3:19
  • Using async/ awaitPremium
    8:20
  • Quiz: Async CodePremium
    1:00
  • Module ResourcesPremium
    1:00

Section 10The "this" Keyword

  • Module IntroductionPremium
    0:43
  • What is "this" about?Premium
    6:14
  • "this" in ActionPremium
    3:27
  • How "this" worksPremium
    4:16
  • Special & Tricky CasesPremium
    10:02
  • "Fixing" "this": Helper Variables & bind()Premium
    5:48
  • Working with Arrow FunctionsPremium
    4:22
  • Quiz: "this"Premium
    1:00
  • Module ResourcesPremium
    1:00

Section 11Prototypes & Inheritance

  • Module IntroductionPremium
    0:41
  • JavaScript Objects - Refresher (incl. Constructor Functions)Premium
    11:19
  • What are "Prototypes" in JavaScript?Premium
    9:43
  • Understanding PrototypesPremium
    5:49
  • The Prototype ChainPremium
    3:15
  • Setting & Changing PrototypesPremium
    3:46
  • Pre-defining the Prototype on Constructor FunctionsPremium
    6:02
  • Changing Prototypes (Patching)Premium
    6:37
  • The Default Prototype and "Monkey Patching"Premium
    4:18
  • Prototypes & "this"Premium
    2:51
  • Protoypes, Classes & MethodsPremium
    9:32
  • Prototypes and the "constructor" Property (Method)Premium
    2:24
  • Quiz: PrototypesPremium
    1:00
  • Module ResourcesPremium
    1:00

Course instructor

Photo of Maximilian Schwarzmüller

Maximilian Schwarzmüller

As a self-taught professional I really know the hard parts and the difficult topics when learning new or improving on already-known languages. This background and experience enable me to focus on the most relevant key concepts and topics. My track record of many 5-star rated courses, more than 1,000,000 students worldwide as well as a successful YouTube channel is the best proof for that.

The most rewarding experience for me is to see how people find new, better jobs, build awesome web applications, work on amazing projects or simply enjoy their hobby with the help of my content. That's why, together with Manuel Lorenz, I founded Academind to offer the best possible learning experience and to share the pleasure of learning with our students.