This project has moved and is read-only. For the latest updates, please go here.

Something wrong with 'strict mode'?

Sep 29, 2011 at 9:02 AM

I tried the following code to execute ('alert' is defined by 'SetGlobalFunction'):

for (var Counter = 0; Counter < 10; Counter++){

In 'strict mode', the following error ist generated after the third iteration: 'ReferenceError: Counter is not defined'

In non-strict mode, the loop is executed completely. No error is generated.

What I am doing wrong?

Sep 29, 2011 at 10:38 AM

I just tried the following in the console:

"use strict"; for (var c = 0; c < 10; c ++) { console.log(c); }

Which worked fine -- but the problem might be a subtle issue with the optimizer which only triggers under certain conditions.  Are you able to open an issue and attach a project which reproduces the problem?

Sep 29, 2011 at 11:39 AM

New issue opened:

Oct 13, 2011 at 2:11 AM

Fixed!  Thanks for reporting this issue :-)