chakra-core / chakra-core/ChakraCore
LHS should be evaluated first in the assignment.
Open
Bug
Compatibility
Severity: 3
- Dominant language
- JavaScript
- Stars
- 9.3k
- Forks
- 1.2k
- PR merge metrics
- No merged PRs in 30d
Description
``` js
(function() {
var x = 1;
(function() {
x = (eval('var x = 20'), 2);
console.log(x == 20); // this should be true
})();
console.log(x == 2); // this should be true
})();
```
Both should print `true`. (Edge/Chrome don't but Firefox does)
see https://tc39.github.io/ecma262/#sec-assignment-operators-runtime-semantics-evaluation
Contributor guide
Assessment
This issue has not been assessed yet.