Any javascript is visible to attackers, that is just the way the web works, browser downloads the script file and then executes it. Making a request for a script file, is the exact same process as making a request for a webpage.
For example, if you are using Google Chrome right now (and for web development you should be using either google chrome or Firefox with firebug installed) hit Ctrl+Shift+J to open up the Developer TOols. You will be able to see everything about this web page. Click the Elements tab, expand the area that says <head>
and look in there for any of the script elements, you will see something like this:
See those urls in the script tags? Those are the urls that you go to to get that code, you can type them directly into your browser and get those files, this is how all webpages work and the trick is to accept it and program secure code even with your hand showing.
Heck, nowadays it's not that hard to decompile and reverse engineer any application so this is generally a good idea. The only time that someone seeing your code would be a problem is if they can see that you have coded a security bug and honestly, javascript does a decent enough job of minimizing your chances for doing something stupid that if you keep learning, and don't do anything too crazy you will be just fine.