EdgeCoders
Published in

EdgeCoders

Function scopes and block scopes in JavaScript

Is the following line a valid line of JavaScript code?

{{{}}}

Yes it is.

These are nested block scopes.

This article is based on an interactive lab I created for jsComplete. You can check out the interactive version here.

--

--

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