Any variables in HubSpot hubl are limited to that scope, you can only use in that scope only. you can use Demo2 in your code to avoid any misunderstanding related to variables, here is the link for developer forum discussion for more details.
Hope it works for you
Did our post help answer your query? Help the Community by marking it as a solution.