While I may not be an expert in JavaScript, I find it intriguing that within a project containing 3 JavaScript files, any of these files can access functions from the others. The real puzzle lies in figuring out how to prevent this from happening. For instance, let's consider three hypothetical JavaScript files named ManagerJS.js, TeamAJS.js, and TeamBJS.js. How can we restrict TeamAJS from accessing TeamBJS while still allowing both to access ManagerJS?