Dler Ari
1 min readMay 14, 2018

--

Thanks. Your statement was tested and your definitely right. However, there might be scenarios where people want to access it outside the scope. But in case of best practice, it is always a good idea to keep things separate from the global environment. In addition, another great practice if you don’t want someone to change your variable within the scope, use const instead, and then let to change it.

--

--

Dler Ari
Dler Ari

Written by Dler Ari

Software Engineer sharing interesting tech topics

No responses yet