Skip to content

Instantly share code, notes, and snippets.

@christiannwamba
Created March 5, 2018 20:23
Show Gist options
  • Save christiannwamba/35f8275ac1efb3a97346f78741d40c4b to your computer and use it in GitHub Desktop.
Save christiannwamba/35f8275ac1efb3a97346f78741d40c4b to your computer and use it in GitHub Desktop.
// app.js
flashColor(threshold, tag, currentPrice) {
let color = " ";
if (tag > threshold ) {
color = "green";
} else if(tag == threshold){
color = "blue";
} else {
color = "red";
}
currentPrice.style.color = color;
currentPrice.style.fontWeight = "bolder";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment