daily pastebin goal
59%
SHARE
TWEET

Untitled

a guest May 31st, 2017 24 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function User(){
  2.     var username, password;
  3.  
  4.     function doLogin(user,pw) {
  5.         username = user;
  6.         password = pw;
  7.  
  8.         // do the rest of the login work
  9.     }
  10.  
  11.     var publicAPI = {
  12.         login: doLogin
  13.     };
  14.  
  15.     return publicAPI;
  16. }
  17.  
  18. // create a `User` module instance
  19. var fred = User();
  20.  
  21. fred.login( "fred", "12Battery34!" );
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top