For example,
x = 1;
y = 2;
swap ('x', 'y');
console.log (x); // 2
console.log (y); // 1
The swapped value may be not a simple variable
How to swap two variables in JavaScript doesn't require to have a calling, so it differs from this question.
Solved. I didn't know that the ref of left of = is evaled before the right is calculated