Created
September 11, 2015 07:11
-
-
Save zackexplosion/576dc62e1e6de522ea86 to your computer and use it in GitHub Desktop.
Sample javascript object params
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
| var init = function(options){ | |
| if(typeof options !== 'object'){ | |
| options = {}; | |
| } | |
| options.a = options.a || ''; | |
| options.b = options.b || ''; | |
| options.c = options.c || ''; | |
| } | |
| var my_init = new Init({ | |
| a: 'hello', | |
| b: '123', | |
| c: 'yessssssss' | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment