i found this example online of the pre and post fix examples of incrementing and decrementing a variable. however, i don't understand why it is return x as 4 and subsequently a as 4 in the example. I understand the y values.
let x = 3;
const y = x++;
console.log(x:${x}, y:${y});
// expected output: "x:4, y:3"
let a = 3;
const b = ++a;
console.log(a:${a}, b:${b});
// expected output: "a:4, b:4"
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…