-
Notifications
You must be signed in to change notification settings - Fork 161
Invalid example #13
Copy link
Copy link
Open
Description
Hey there, in the Combined var declarations section, the bug that you illustrate through accidentally forgetting a comma in a list of combined variable declarations is easily avoided by using the 'use strict'; directive, which causes an Uncaught ReferenceError to be thrown rather than silently creating a global variable.
I agree that using combined or multiple var statements is a personal preference rather than a best-practice, but using strict mode wherever possible, definitely is a best practice :)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels