Copy link to clipboard
Copied
For example v==3 turns red. I would like to turn red if 9, 15, 21, 25, 27, 29 is entered. How do I go about doing this? Do I have to do invidual lines or do I put && between values?
My code knowledge is about .01.. I just find what I'm looking for online and tweak it.
var v = Number(event.value);
if (v==1) {event.target.fillColor = color.green;}
else if (v==2) {event.target.fillColor = color.yellow;}
else if (v==3) {event.target.fillColor = color.red;}
else event.target.fillColor = color.white;
You can't use && that would mean that multiple values exist at the same time, instead use || (or)
(v==1 || v==9 || v==15...etc)
Copy link to clipboard
Copied
You can't use && that would mean that multiple values exist at the same time, instead use || (or)
(v==1 || v==9 || v==15...etc)
Copy link to clipboard
Copied
Thank you, much appreciated!