I need come feedback and an explanation for the following quiz I encountered:

`x = 10, y = 20` and finally `x = y`

If we consider `x` and `y` as variables and the `=` operator standing for 'assignment'. What are the values of `x` and `y`?

After doing some basic reasoning on what I learnt about variables and values, I've written the following code:

```
var y = 10;
var x = 20;
console.log(x = y);

```

The result printed out is 20. Is this process and reasoning giving the correct result? If it is I understand the process but I am not sure to know the reason why the result is 20. 
I would need some feedback and explanation on this matter.