This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 269678 - Standard for loop syntax flagged as ECMA7 syntax
Summary: Standard for loop syntax flagged as ECMA7 syntax
Status: NEW
Alias: None
Product: javascript
Classification: Unclassified
Component: Editor (show other bugs)
Version: 8.2
Hardware: Macintosh (x86) Mac OS X
: P3 normal (vote)
Assignee: Petr Pisl
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-01-29 22:40 UTC by _ wadechandler
Modified: 2017-01-29 22:40 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description _ wadechandler 2017-01-29 22:40:37 UTC
I found in the file jquery.textillate.js of the project https://github.com/jschr/textillate the for loop in the following code is marked with a hint which reads "ECMA7 feature used in pre-ECMA7 source", and that is incorrect as it is simple and standard for loop syntax without a body:

  function shuffle (o) {
      for (var j, x, i = o.length; i; j = parseInt(Math.random() * i), x = o[--i], o[i] = o[j], o[j] = x);
      return o;
  }

Some of the code in the file definitely has some issues, such as missing semi-colons etc, but this seems like it should be fine unless I'm missing something.

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Loops_and_iteration#for_statement