Skip to content

Instantly share code, notes, and snippets.

@evenfrost
Created October 11, 2018 16:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save evenfrost/e991682380b993d92451f93a169cf86a to your computer and use it in GitHub Desktop.
Save evenfrost/e991682380b993d92451f93a169cf86a to your computer and use it in GitHub Desktop.
Just simple JS function
function isGreater(a, b, cb) {
var greater = false;
if (a > b) {
greater = true;
}
cb(greater);
}
var greater;
isGreater(1, 2, function (result) {
if (result) {
greater = true;
} else {
greater = false;
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment