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

Summary: Standard for loop syntax flagged as ECMA7 syntax
Product: javascript Reporter: _ wadechandler <wadechandler>
Component: EditorAssignee: Petr Pisl <ppisl>
Status: NEW ---    
Severity: normal    
Priority: P3    
Version: 8.2   
Hardware: Macintosh (x86)   
OS: Mac OS X   
Issue Type: DEFECT Exception Reporter:

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