Skip to content

Instantly share code, notes, and snippets.

@harryadel
Created August 26, 2016 19:21
Show Gist options
  • Select an option

  • Save harryadel/e19f8a1e43840d75873757a38330485e to your computer and use it in GitHub Desktop.

Select an option

Save harryadel/e19f8a1e43840d75873757a38330485e to your computer and use it in GitHub Desktop.
/*
My answer for exercise 'Minimum'
in Eloquent JavaScript Second Edition
Chapter 3 Functions
*/
function min(a,b) {
x = a - b;
if (x > 0) {
return b;
} else {
return a;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment