Skip to content

Instantly share code, notes, and snippets.

@rdegges
Created July 21, 2017 01:32
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 rdegges/1f875385dc0bfd4fafbb882ff8be051a to your computer and use it in GitHub Desktop.
Save rdegges/1f875385dc0bfd4fafbb882ff8be051a to your computer and use it in GitHub Desktop.
Crypt Compare getColor
/**
* Return a CSS color (either red or green) depending on whether or
* not the value passed in is negative or positive.
*/
getColor: (num) => {
return num > 0 ? "color:green;" : "color:red;";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment