I'm running this following code, and expect to have a
localization of the variable scope, so that while the alert confirm
is processed I would still be able to work on the variable scope
when it was called. But it does not work as expected. I get i=10
inside the function instead of i=2.