Oh really? I have assigned script-level variables the initial value of undefined with the intent of initializing them fully inside a later function call, in strict mode, which works just fine. To minimize the opportunity for conflicts, any function-scope variables use one of the ES5 keywords for this purpose in their declarations. Combined with a linter enforcing the rules, I make it as easy as possible to avoid trouble and detect the cause if it happens anyway.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Oh really? I have assigned script-level variables the initial value of
undefined
with the intent of initializing them fully inside a later function call, in strict mode, which works just fine. To minimize the opportunity for conflicts, any function-scope variables use one of the ES5 keywords for this purpose in their declarations. Combined with a linter enforcing the rules, I make it as easy as possible to avoid trouble and detect the cause if it happens anyway.