codeburst

Bursts of code to power through your day. Web Development articles, tutorials, and news.

Follow publication

JS Demystified 01 — Variable Hoisting

Misa Ogura
codeburst
Published in
4 min readAug 4, 2017

Intro

Hoisting

JavaScript Engine

Browser Developer Tool

Variable Hoisting

Example 1.
Example 2.
var x
console.log(x)
Example 3.
Example 4.
var x
console.log(x)
x = 10
console.log(x)

Wrap-up

Example 5.
// answer to Example 5.x is undefined
x is undefined
x is 5

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

Published in codeburst

Bursts of code to power through your day. Web Development articles, tutorials, and news.

Written by Misa Ogura

Senior Machine Learning Engineer @Healx | Creator of github.com/MisaOgura/flashtorch | Published Scientist | Co-founder of @womendrivendev

Responses (8)

Write a response