JSH318913: Define variable before it is used

This option prohibits the use of a variable before it was defined. JavaScript has function scope only and, in addition to that, all variables are always moved - or hoisted - to the top of the function. This behavior can lead to some very nasty bugs and that's why it is safer to always use variable only after they have been explicitly defined. (JSHint option 'latedef')

TypeName: DefineVariableBeforeItIsUsed
CheckId: JSH318913
Severity: Warning
Type: JavaScriptFile
Links

comments powered by Disqus