>>17731033i like to imagine it like boxes
each function has its own little box with variables and objects that only it can access (while the global scope is kind of a big box that contains all other boxes that can be accessed by everyone)
i hope this doesn't confuse you, im kind of bad at teaching