Variable store using 'var' will be removed once the script end or unset.

Whereas variable store using 'set' will only be removed when it is unset or use with -uN switch