Shortest code to check if a number is in a range in JavaScript
13 chars, checks both variants a&lt;b and b&lt;a

(x-a)*(x-b)&lt;0


In C may be used expression (may be also in JavaScript). 11 chars, No multiplications (fast)

(x-a^x-b)&lt;0