Create a library file named weather.js that contains the definitions of your dew point and wind chill functions. Then, create a Web page named indexes.html that has text boxes where the user can enter the temperature, humidity, and wind speed. The page should load the weather.js library and call the appropriate functions to display the dew point or wind chill at the click of a button.

Use your page to determine the dew point under the following conditions:

temperature = 85 F humidity = 60%
temperature = 95 F humidity = 75%
temperature = 100 F humidity = 90%

Use your page to determine the wind chill under the following conditions:

temperature = 20 F wind speed = 10 mph
temperature = 10 F wind speed = 20 mph
temperature = 0 F wind speed = 30 mph


```
function WindChill(temp, wind)
// Assumes: temp is a temperature in Fahrenheit,
// wind is wind speed in miles per hour
// Returns: the wind chill index (what the current conditions feel like)
{
return 35.74 + 0.6123*temp + (0.4275*temp - 35.75)*Math.pow(wind, 0.16);
}

function DewPoint(temp, humidity)
// Assumes: temp is a temperature in Fahrenheit,
// humidity is the relative humidity (0-100%)
// Returns: the temperature at which water vapor condenses
{
return (temp - (100 - humidity)/2.778);
}

------








Weather Calculator






Temperature: °F


Wind speed: mph


Relative humidty: %










------

temp=85, humidty=60 dew point = 70.60115190784737
temp=95, humidty=75 dew point = 86.0007199424046
temp=100, humidty =0 dew point = 64.00287976961843

temp=20, wind=10 8.670038235710777
temp=10, wind=20 -8.968220556825415
temp=0, wind=30 -25.864926944480686
```

Computer Science & Information Technology

You might also like to view...

When using Word's mail merge feature, the salutation of the letter is called the ________

Fill in the blank(s) with correct word

Computer Science & Information Technology

The process of moving tables into one database file, and forms, queries, and reports into a separate database file is called ________

A) splitting B) separating C) jamming D) moving

Computer Science & Information Technology

The ________ function returns the value of an element in a table or array selected by the row and column number indexes

Fill in the blank(s) with the appropriate word(s).

Computer Science & Information Technology

A(n) ____________________ network is a sub-network in which a dedicated circuit is established between sender and receiver, and all data passes over this circuit.

Fill in the blank(s) with the appropriate word(s).

Computer Science & Information Technology