Skip to content

Instantly share code, notes, and snippets.

@rdegges

rdegges/app.js

Created Jul 21, 2017
Embed
What would you like to do?
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