Describe the bug
Babel is removing some parentheses form this for loop, and the resulting code logs 0 instead of 1
Input code
let count = 0;
for (var a = 1 || (2 in {}) in { x: 1 }) count++;
console.log(count);
Expected behavior
Same code
Actual behavior
let count = 0;
for(var a = 1 || 2 in {} in {
x: 1
})count++;
console.log(count);
Describe the bug
Babel is removing some parentheses form this for loop, and the resulting code logs
0instead of1Input code
Expected behavior
Same code
Actual behavior