Question: Create an HTML document, which contains a text field, a button, and a div. Label the first text field Fahrenheit and put the text Celsius

Create an HTML document, which contains a text field, a button, and a div. Label the first text field Fahrenheit and put the text Celsius on the button. Write two functions with these headers: function doInputOutput() function fahrToCels(fahr) The first function (doInputOutput) must do the following: a. get a temperature in Fahrenheit using the prompt function b. call the second function (fahrToCels) c. store the value returned by fahrToCels in a variable d. output the value returned by fahrToCels using document.write() The second function (fahrToCels) must a. take a temperature in Fahrenheit as a parameter b. calculate the corresponding Celsius temperature c. return the Celsius temperature In other words, the second function (fahrToCels) must not gather any input from a user and must not output anything for a user to see. Instead, it must calculate and return the result, which makes this second function very reusable in other projects.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!