I want to assign a value to a variable in javascript
var a = b || c; //however if b > 200 choose c
Is there a simple way to do this?
var a = (b && b <= 200) ? b : c;
Thanks for any tips or advice. Just trying to write this as cleanly as possible.
var a = b;
if(b == undefined || b > 200){
a = c;
}