Created
July 21, 2017 01:32
-
-
Save rdegges/1f875385dc0bfd4fafbb882ff8be051a to your computer and use it in GitHub Desktop.
Crypt Compare getColor
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* 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