-
-
Save gilomen2/59e4bb9a32e2a5b5579e29f717d2f898 to your computer and use it in GitHub Desktop.
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 _if(bool, func1, func2) { | |
if(bool === true){ | |
return func1(); | |
} else { | |
return func2(); | |
} | |
}; | |
//Test | |
Test.assertEquals(_if(true, function(){console.log("True")}, function(){console.log("false")}), 'True') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment