var value1=50
var value2=140
group 1
a,b a>=42 a<=126 , b>=140 b<=213
a,c a>=42 a<=126 , c>=1.40 c<=2.13
b,a b>=140 b<=213 , a>=42 a<=126
c,a c>=1.40 c<=2.13 , a>=42 a<=126
group 2
d,e d>=91 d<=443 , e>=58 e<=84
d,f d>=91 d<=443 , f>=4.8 f<=7
e,d e>=58 e<=84 , d>=91 d<=443
f,d f>=4.8 f<=7 , d>=91 d<=443
Need to program this into js so that the two values will check through the ranges of numbers for a suitable number range. Im looking to have it scan through the first group if not successfully finding two ranges to suit both values it checks with the second group.
I have tried a number of different methods for this but i cant work out how to do it?
Help much appreciated
Something like the following: http://jsbin.com/ipefuf/1/
It’s a little verbose – could be shortened, but does roughly what you need. Start with it.