JSFiddle - React, Tailwind, and code Playground

by Xeon06

JavaScript

function heatIndex(F, rh)
{
    var Hindex;
    Hindex = -42.379 + 2.04901523*F + 10.14333127*rh
    - 0.22475541*F*rh - 6.83783*Math.pow(10,-3)*Math.pow(F, 2)
    - 5.481717*Math.pow(10,-2)*Math.pow(rh, 2)
    + 1.22874*Math.pow(10,-3)*Math.pow(F, 2)*rh
    + 8.5282*Math.pow(10,-4)*F*Math.pow(rh, 2)
    - 1.99*Math.pow(10,-6)*Math.pow(F, 2)*Math.pow(rh, 2);
    return Hindex;
}

alert(heatIndex(46, 96));