Amazing tools for better understanding Scope and Block in javaScript!

If you are reading this article, we assume that you are familiar with the concept of scope and block in JavaScript, and we only intend to introduce you to some practical tools in order to better understand this concept.

JS Scope Visualizer


This content originally appeared on DEV Community and was authored by Hooman Talakian

If you are reading this article, we assume that you are familiar with the concept of scope and block in JavaScript, and we only intend to introduce you to some practical tools in order to better understand this concept.

JS Scope Visualizer

In JavaScript, the "Scope" concept has always been tricky for programmers, no matter how experienced they are. here is a simple tool for visualizing the scope of every part of your code. this online tool illustrates your scopes with colors. code sections with the same color are in the same scope! enjoy.
🌎 https://js-scope-visualizer.firebaseapp.com/#visualizer

VS Code Trick

VS Code preview

If you are a programmer seeking perfect control over your code, I strongly recommend copying these two lines from here (at the bottom) into your VScode "setting.json" file. Why?!
As you can see (in GIF), by doing this, you activate a built-in function that automatically colorizes the matching brackets and at the same time indicates the scope/block you are in! So what are you waiting for?
Copy these two lines into your VScode "setting.json" file :

"editor.bracketPairColorization.enabled": true,
"editor.guides.bracketPairs": "active",

There are, of course, other tools and methods that can be used to better understand Scope and Block. Please feel free to refer to it in the comments section so it can be included in the article if it is useful.

My name is "Hooman Talakian" and you can follow me on LinkedIn if you liked this article.


This content originally appeared on DEV Community and was authored by Hooman Talakian


Print Share Comment Cite Upload Translate Updates
APA

Hooman Talakian | Sciencx (2022-03-25T11:10:28+00:00) Amazing tools for better understanding Scope and Block in javaScript!. Retrieved from https://www.scien.cx/2022/03/25/amazing-tools-for-better-understanding-scope-and-block-in-javascript/

MLA
" » Amazing tools for better understanding Scope and Block in javaScript!." Hooman Talakian | Sciencx - Friday March 25, 2022, https://www.scien.cx/2022/03/25/amazing-tools-for-better-understanding-scope-and-block-in-javascript/
HARVARD
Hooman Talakian | Sciencx Friday March 25, 2022 » Amazing tools for better understanding Scope and Block in javaScript!., viewed ,<https://www.scien.cx/2022/03/25/amazing-tools-for-better-understanding-scope-and-block-in-javascript/>
VANCOUVER
Hooman Talakian | Sciencx - » Amazing tools for better understanding Scope and Block in javaScript!. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2022/03/25/amazing-tools-for-better-understanding-scope-and-block-in-javascript/
CHICAGO
" » Amazing tools for better understanding Scope and Block in javaScript!." Hooman Talakian | Sciencx - Accessed . https://www.scien.cx/2022/03/25/amazing-tools-for-better-understanding-scope-and-block-in-javascript/
IEEE
" » Amazing tools for better understanding Scope and Block in javaScript!." Hooman Talakian | Sciencx [Online]. Available: https://www.scien.cx/2022/03/25/amazing-tools-for-better-understanding-scope-and-block-in-javascript/. [Accessed: ]
rf:citation
» Amazing tools for better understanding Scope and Block in javaScript! | Hooman Talakian | Sciencx | https://www.scien.cx/2022/03/25/amazing-tools-for-better-understanding-scope-and-block-in-javascript/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.