One significant difference is that at runtime ...//a x does not exist. Now in your case, in both cases it is undefined , but, generally speaking, it is possible to access the variable x during ...//a , and in the first case it is not.
Otherwise, it is very similar in your circumstances. Indeed, in your case, the code is basically reorganized into a separate function, as in any other language.
neebz source share