Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function abc() {
- if (some_condition) {
- message('blah');
- return; // early exit
- }
- // otherwise do stuff
- }
- function check_condition() {
- if (some_condition) {
- message('blah');
- return false; // early exit
- }
- else
- return true;
- }
- function abc() {
- if (!check_condition()) {return;}
- // otherwise do stuff
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement