After going through the link you provided and following other resources, I came up with this: https://repl.it/Jwru/3. Any feedback is appreciated.
var temp = 85;
var hum = 10;
var HIADJ;
var HI = -42.379 + 2.04901523*temp + 10.14333127*hum - .22475541*temp*hum - .00683783*temp*temp - .05481717*hum*hum + .00122874*temp*temp*hum + .00085282*temp*hum*hum - .00000199*temp*temp*hum*hum;
console.log("Prelimenary Heat Index is " + HI);
if (hum < 13 && temp > 80 && temp < 112) {
var x = ((13 - hum)/4) * (Math.sqrt(17-Math.abs(temp-95)/17));
HIADJ = HI - x;
console.log("Subtracted x=" + x + ". Newl heat index after adjustment is HIADJ= " + HIADJ);
} else if (hum > 85 && temp > 80 && temp < 87) {
var y = ((hum - 85)/10)*((87-temp)/5);
HIADJ = HI + y;
console.log("Added y=" + y + ". Newl heat index after adjustment is HIADJ=" + HIADJ);
} else {
HIADJ = HI;
console.log("Heat index with no adjustment is " + HIADJ);
}
Used this site heavily for reference: http://www.wpc.ncep.noaa.gov/html/heatindex_equation.shtml