Created
April 4, 2017 20:47
-
-
Save terrancebryant/2f0de0e3ef087110c1b67984c52a7d44 to your computer and use it in GitHub Desktop.
// source https://jsbin.com/vaxaqe
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <script id="jsbin-javascript"> | |
| function User(){ | |
| var username, password; | |
| function doLogin(user,pw) { | |
| username = user; | |
| password = pw; | |
| } | |
| var publicAPI = { | |
| login: doLogin | |
| }; | |
| return publicAPI; | |
| } | |
| var fred = User(); | |
| fred.login( "fred", "12Battery34!" ); | |
| </script> | |
| <script id="jsbin-source-javascript" type="text/javascript">function User(){ | |
| var username, password; | |
| function doLogin(user,pw) { | |
| username = user; | |
| password = pw; | |
| } | |
| var publicAPI = { | |
| login: doLogin | |
| }; | |
| return publicAPI; | |
| } | |
| var fred = User(); | |
| fred.login( "fred", "12Battery34!" );</script> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function User(){ | |
| var username, password; | |
| function doLogin(user,pw) { | |
| username = user; | |
| password = pw; | |
| } | |
| var publicAPI = { | |
| login: doLogin | |
| }; | |
| return publicAPI; | |
| } | |
| var fred = User(); | |
| fred.login( "fred", "12Battery34!" ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment