Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if (typeof someFunc === "function") {
- var result = someFunc.apply(this, arguments);
- // if someFunc returns a non-false value, end execution
- if (result) {
- return result;
- }
- }
- // if there's no someFunc or someFunc returned 'false',
- // 'null', 'undefined', '', 0, hell-knows-what-else ...
- // note, that we don't return anything here
- otherFunc.apply(this, arguments);
- return (typeof someFunc === "function"
- ? someFunc.apply(this, arguments)
- : void 0) || otherFunc.apply(this, arguments);
- return (c
- ? someFunc.apply(this, arguments) || undefined
- : undefined)
- //Unless f is a function and returns a non false value, return undefined
- return f instanceof Function ? f.apply(this, arguments) || undefined : undefined;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement