Problem with logic operators
-
I have been trying to use logic to have specific return values when the user inputs a number on “fieldname4” in CFF.
This is my code:
(function(){
if(fieldname4 < 15000) return 4.72;
if(fieldname4 > 15001 && fieldname4 <20000 ) return 4.25;
if(fieldname4 > 20001 && fieldname4 <25000 ) return 4.25;
if(fieldname4 > 25001) return 2.71;
})();
I just can not see the error and it’s driving me nuts, can anyone see the error in the code, the only return value I get right is 2.71.
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Problem with logic operators’ is closed to new replies.