Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function User(){
- var username, password;
- function doLogin(user,pw) {
- username = user;
- password = pw;
- // do the rest of the login work
- }
- var publicAPI = {
- login: doLogin
- };
- return publicAPI;
- }
- // create a `User` module instance
- var fred = User();
- fred.login( "fred", "12Battery34!" );
Add Comment
Please, Sign In to add comment