I am new to JavaScript and learning about scope.
I understand that there is Global Scope and Local Scope, but wanted to know if variables in the Local scope could be made available outside their scope.
Is this possible, and if so how?
Thank you to everyone with the quick responses.
I'm learning to program and I had an outline made up on topics to research from a programmer. They said there is a way and even though it is bad practice, this could be used as a developer tool and there are some scenarios this would be helpful in.
question from:
https://stackoverflow.com/questions/65834622/how-to-make-variables-accessible-outside-of-their-scope-in-javascript 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…