Created
September 29, 2011 19:37
-
-
Save jhuttner/1251710 to your computer and use it in GitHub Desktop.
My Code Review Submission
This file contains 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
_oMyController.setListener('firstEvent secondEvent', function(data) { | |
if (data.is_second_event) { | |
// do something specific just to the second event | |
} | |
// do something common to both events | |
}); | |
//////// VERSUS ////////////// | |
_oMyController.setListener('firstEvent secondEvent', function(data, event_name) { | |
if (event_name === 'secondEvent') { | |
// do something specific just to the second event | |
} | |
// do something common to both events | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment