I am looking for javascript where a value if it falls between:
A thru B = Value for A is shown
C thru D = Value for C is shown
So lets say I have value= $90,495.00
these are my options:
$80,000=$396/yr.
$100,000=$432/yr.
$120,000=$480/yr.
$140,000=$516/yr.
$160,000=$576/yr.
$180,000=$636/yr.
$200,000=$708/yr.
So then for above stated value, $396 is chosen.
if value= $159,999.00 then $516 is chosen.
note:
(I want to leave my script open to change, so that if in the future if I decide to round up as well then if value is a cent over halfway it will round up to the next value; example being if value= $110,000.01 it will choose $480.)
A thru B = Value for A is shown
C thru D = Value for C is shown
So lets say I have value= $90,495.00
these are my options:
$80,000=$396/yr.
$100,000=$432/yr.
$120,000=$480/yr.
$140,000=$516/yr.
$160,000=$576/yr.
$180,000=$636/yr.
$200,000=$708/yr.
So then for above stated value, $396 is chosen.
if value= $159,999.00 then $516 is chosen.
note:
(I want to leave my script open to change, so that if in the future if I decide to round up as well then if value is a cent over halfway it will round up to the next value; example being if value= $110,000.01 it will choose $480.)
Comment