JavaScript Super global variable?

https://code.sololearn.com/WPjGyWkmNTjI/?ref=app With ECMA6 where does this variable stand? Var? Obviously not let. Not constant either.

12th Jul 2018, 11:39 AM
Akib - avatar
2 Answers
+ 2
This is old style js syntax, where 'var' could be omitted. If you add "use strict" at the beginning, such syntax will be disabled and you get error displayed.
12th Jul 2018, 1:04 PM
Микола Федосєєв
Микола Федосєєв - avatar
I'm not sure exactly what the question is, but the variable "someVar" is considered a global variable. It is a part of window, meaning you could also write console.log(window.someVar) to get the same results.
12th Jul 2018, 12:22 PM
Marcus Otterström
Marcus Otterström - avatar