var randomWithPrecision = function (min, max, precision) {
var x = Math.random() * (max - min) + min;
var p = Math.pow(10, precision);
return Math.round(x * p) / p;
};
for (var i = 0; i < 10; i++) {
console.log( randomWithPrecision(20, 24, 1) );
}