Javascript Number inClosedRange(x,y)
Number.prototype.inClosedRange = function(x,y){ let min = Math.min(x, y), max = Math.max(x, y);/* w ww . j av a 2 s .c o m*/ return this >= min && this <= max; }