You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
JS: Can't easily do assignments in loop conditions #134
The extra set of parens around an assignment inside a conditional is the de-facto way to communicate to the linter/compiler: "I really intend to do an assignment here, don't bother me" since the olden C days.
Ah! Then we should probably rewrite the warning message in Aether so that it's less confusing; perhaps, "If you really want = (assignment) instead of == (equality), add parentheses: (enemy = this.findNearestEnemy())."
Activity
UltCombo commentedon Jun 30, 2015
This is actually how JSHint is supposed to work.
The extra set of parens around an assignment inside a conditional is the de-facto way to communicate to the linter/compiler: "I really intend to do an assignment here, don't bother me" since the olden C days.
nwinter commentedon Jun 30, 2015
Ah! Then we should probably rewrite the warning message in Aether so that it's less confusing; perhaps, "If you really want
=(assignment) instead of==(equality), add parentheses:(enemy = this.findNearestEnemy())."UltCombo commentedon Jun 30, 2015
Makes sense. 😄