Have a look at this snippet:
var changeNumber = function(number) {
return number + 5;
};
var newNumber = 4;
changeNumber(newNumber);
alert(newNumber);
I've been taught that the function should reassign whatever value it returns to the global variable NewNumber, so that newNumber should change from 4 to 9. This doesn't, however, seem to happen when I test-run the code; newNumber retains its original value. So where'd I go wrong?
Prog