If the password does not match case or is invalid the material on the page is secured.This is poor man's simple security. You want to use somethingrobust for sensitive information. This will keep most out, butprobably not the ones you really wanted to stay away. You want to add another script to protect the source of your files, too.
The nature of JavaScript libraries means they can be accessed and utilized by any site online, not just yours. Learn how to restrict access of your libraries to only your own sites, warding off bandwidth theft in the process.