This issue is related to es2015 scoping issue and have been fixed on #713.
Now just open for referring in the test case and it should be closed after the PR#713 has been merged.
Input Code
function test () {
var arr = ['a', 'b', 'c'];
var len = arr.length;
var result = null;
for (let i = 0; i < len; i++) {
result = arr[i];
}
return result || {};
}
Actual Output
'use strict';function test(){for(var a=['a','b','c'],b=a.length,d=0,;d<b;d++)a[d];return c||{}}
Expected Output
'use strict';function test(){for(var a=['a','b','c'],b=a.length,d=0,c=0;d<b;d++)c=a[d];return c||{}}
This issue is related to es2015 scoping issue and have been fixed on #713.
Now just open for referring in the test case and it should be closed after the PR#713 has been merged.
Input Code
Actual Output
Expected Output