Could any one tell me why the result of below code is: 3,14,14,36,45,52
function myCompare(x, y)
if (x << y)
else if (x === y)
var myArray = [14,52,3,14,45,36];
For me the result is 36, 45, 14, 3, 52, 14 (the reverse order) !
x<<y is not x<y but x shifts x in binary representation y (< 32) bits to the left !
Then the test return always -1 and give the reverse order !