Can you figure out why the variable 'a' doesn't increase by 1 in the following code snippet?
var a = 5;
function abc(y) {
y++;
}
abc(a);
// The value of 'a' remains 5, instead of increasing to 6. Why is that?
However, when we look at this other code snippet:
var a = 5;
function abc() {
a++;
}
abc();
// Now, the value of 'a' is indeed increased to 6.