how to get median from two integer like :
I have simple value of minimum and maximum ::=> 25 and 55,
so median from 25 to 55 will be around 37.5, its ok if we got 38 as we need integer
How can I find using jQuery of javascript ?
how to get median from two integer like :
I have simple value of minimum and maximum ::=> 25 and 55,
so median from 25 to 55 will be around 37.5, its ok if we got 38 as we need integer
How can I find using jQuery of javascript ?
 
    
    You can use the bitwise right shift operator for integer division it will always give the result as an integer value only.
var num1 = 25;
var num2 = 58;
var result = (num1+num2)>>1;
console.log(result);