it is 20.
- first you instantiate var z with 25 in the outer scope
- you call x where another var z will gets instantiated with the value of 20
- since the scoping of javascript to my knowledge is a union merge of the global space variable table (probably more complicated it's just a laymen observation) the next function y takes it's outer scope in this case the z with the value 20 and logs it.
- the outer z remains 25 since using the keyword var in the x scope defines that it has to be a new instance of z within x.
this is how I understand it. Please correct me if I am wrong.