Question #17

Author: admin
tags: JavaScript  
let x = 1;
x = ++x + x++ + x;
console.log(x); // ??
What will the console output be?
1
2
3
4
5
6
7
8
9
An error will occur
The steps of the interpreter can be described in such a sequence.
x = ++x + x++ + x;
x = 2 + x++ + x;
x = 2 + 2 + x;
x = 4 + x;
x = 4 + 3;
x = 7;
https://tc39.es/ecma262/#sec-postfix-increment-operator
Rate the difficulty of the question:
easyhard