troubleshooting Question

Multipe File - Variable Scope

Avatar of grafixnetwork
grafixnetwork asked on
2 Comments1 Solution245 ViewsLast Modified:
I'm creating a project that will use several files:

I want to use strict, I want to place all variables in the file.  When I use my() for variable declaration in the file, the variables are not visible to the other two scripts - I have required the setup file.  Even though all the my() statement are outside any {} they are only visible to the file.

How can I declare variables in one file so that they are visible in the other files - and still use strict?

Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 2 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 2 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros