JS Demystified - Tricky Concepts in JavaScript


Welcome to JS Demystified Series!

It is my humble attempt to demystify tricky concepts in JavaScript.

It originally started out on Medium, and has been adopted to platform to implement runnable snippets for better reading experiences.

The source code of this playground can be found on Github.

Who this is for?

This series aims to discuss some of the tricky concepts in great detail. Therefore, it's recommended that you have some experience with JavaScript and are familiar with its syntax.


Here is a list of topics that have been published on Medium, which I am going to adopt into this playground. The list will be updated as I add more contents.

  1. Variable Hoisting
  2. Function Hoisting
  3. Scope
  4. Execution Context
  5. Closures

Okay, let's dive into it!

Create your playground on
This playground was created on, our hands-on, knowledge-sharing platform for developers.
Go to