Skip to content

Tag: vs

The best Visual Studio shortcuts

Become smarter by using shortcuts rather than using the mouse. Few of the hand-picked Visual Studio shortcuts

Local vs Global scope – JavaScript

Local scope Let’s start by declaring a variable inside a function called cool (just a name) to understand the difference between local and global scope Let’s declare a variable called localVariable with type var in our function as below var cool = function (){ var localVariable = 10; console.log(‘Inside function: ‘ +localVariable) } cool(); console.log(‘Outside variable: ‘ +localVariable); And we call our function, and also we are trying to write our variable value inside and outside the function in the console. Once the following line is executed console.log(‘Inside function:’ +localVariable)… Read more Local vs Global scope – JavaScript