Open in app
Abhay Srivastav
138 Followers
About

Sign in

138 Followers
About
Open in app
Abhay Srivastav

Abhay Srivastav

Dec 1, 2018·1 min read

<script>
var a = 5;
console.log(window.a);
</script>

It logs 5 not undefined as you said. Can you explain ?

Abhay Srivastav

Meditator | Coder | Blogger | Memer http://abhaysrivastav.net

Execution context and the call stack — visually illustrated by a slice of tasty cake
1.9K
7

JavaScript Teacher

More from Abhay Srivastav

Meditator | Coder | Blogger | Memer http://abhaysrivastav.net

More From Medium

How to use multiple git accounts

Abhay Srivastav in Bits and Pieces

NYTimes Peru N-Word, Part One: Introduction

Donald G. McNeil Jr.

NYTimes Peru N-Word, Part Two: What Happened January 28?

Donald G. McNeil Jr.

NYTimes Peru N-Word, Part Three: What Happened in the 2019 Investigation?

Donald G. McNeil Jr.

NYTimes Peru N-Word, Part Four: What Happened in Peru?

Donald G. McNeil Jr.

My Boyfriend Sleeps in the Same Bed as Another Woman Every Night

Matilda Swinney in Real Talk About Sex

9 Painful Signs That Your Partner Is No Longer In Love With You

Elizabeth Kasujja in Hello, Love

Owning a Decrepit Shack in The Middle of Nowhere Is The New American Millennial Dream

Jessica Wildfire in The Apeiron Blog

About

Help

Legal

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store