Variable Scope explained using WebStorm