News

Scope in JavaScript refers to context (or portion) of the code which determines the accessibility (visibility) of variables. In JavaScript, we have two types of scope, local , and global .
The scope of a variable has nothing to do with optics or mouthwash, but rather the extent to which a variable is visible to other parts of a JavaScript program. In the old days, var would hoist a ...
i.e. intuitively it looks like the variable will only be available within the block but it is accessible outside the block .. in javascript's case, because var doesn't make a block level ...