Scope for Beginners

In JavaScript, lexical scope deals with where your variables are defined, and how they will be accessible — or not accessible — to the rest of your code.

Primitive Data Types in Java

Variables in Java need to be declared before they can be used in Java because it is a statically-typed language. Because of this, you need to state the type of variable you are declaring.

Let and Const for Block Scope

Up until ES6, you couldn’t achieve true block scoping in JavaScript. With the var keyword, the scope in a code block could be accessed in the global scope, as variable declarations are hoisted to the top of scope and the...