Skip to content

Instantly share code, notes, and snippets.

@WillSquire
Last active August 29, 2015 14:23
Show Gist options
  • Save WillSquire/d1b866402ec92ae20604 to your computer and use it in GitHub Desktop.
Save WillSquire/d1b866402ec92ae20604 to your computer and use it in GitHub Desktop.
Difference - Returns the difference between two numbers.
/**
* Finds the difference between two numbers.
*
* @param {number} a
* @param {number} b
* @returns {number}
*/
function difference(a, b) {
return Math.abs(a-b);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment