JS logic question
Why is the answer to this
20 30 10 20 200 and not 10 20 20 30 200?Would anyone mind explaining it to me?
20 30 10 20 20010 20 20 30 200var x = 10;
var y = 20;
function abc(x, y) {
x = x + 10;
y = y + 10;
console.log(x);
console.log(y);
return x * 10;
}
z = abc(x,y);
console.log(x);
console.log(y);
console.log(z);