{ "Country "Bahrain", "Tenps"il ("day"s "SUNDAY", "tenp"i 37), ("day": "NONDAY", "temp"i 35), ("day: "TUESDAY", "teno": 39), ("days "VEDNESDAY", "te" 7, ("dayi "THURSDAY", "teng"s 35), ("day" "FRIDAY", "temp": 34). ("days "SATURDAY", "teng: 37) Implement findTempl ) function as follows: Sample Example This function will be called whenever the user change the value of the pull-down menu. This function should contact the Web Service API, sending the selected country code, to Co display the information (country, daily temperatures in the week and average woekly temperature) inside the div tag Couniry whose id-result as shown in the example on the right. aha In addition, the country name and the average temperatures should be saved as one JS object inside an array in a local storage. Whenever new request is made, the countrylaverage will be saved and added to the array inside the local storage (duplicates is allowed). 1. SUNDAY Temp is 37 2. MONDAY Temp is 5 3. TUESDAY Temp is 39 4. WEDNESDAY Temp 37 5. THURSDAY Tepis 6. FRIDAY Temp is 34 7. SATURDAY Tenp is 37 Average Temp 6.287142S71428S (Tip: define JS Object with Country/Average properties) and then push it inside the amay)

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question
JSON Response example when code = BAHRAIN as follows:
{ "Country": "Bahrain",
"Tenps"il
("day": "SUNDAY", "temp"i
{"day": "HONDAY", "temp": 35),
("day": "TUESDAYr, "teng": 39),
("day": "WEDNESDAY", "tenp": 37),.
("day"i "THURSDAY", "tenp": 35),
("day"i "FRIDAV", "temp": 34),
("day": "SATURDAY", "teng": 37)
1.
Implement find Templ ) function as follows:
Sample Eample
This function will be called whenever the user change the
value of the pull-down menu. This function should contact Ve
the Web Service API, sending the selected country code, to
Co
display the information (country, daily temperatures in the
week and average weekly temperature) inside the div tag
whose id -result as shown in the example on the right.
Country ahraln
In addition, the country name and the average temperatures
should be saved as one JS object inside an array in a local
storage. Whenever new request is made, the countrylaverage
will be saved and added to the array inside the local storage
(duplicates is allowed).
1. SUNDAY Temp is 37
2. MONDAY Temp is 35
3. TUESDAY Temp is 39
4. WEDNESDAY Temp is 37
5. THURSDAY Tenp is 35
6. FRIDAY Temp is 34
7. SATURDAY Temp is 37
Average Temp M.28571428571428s
(Tip: define JS Object with Country/Average properties) and
then push it inside the array)
Use the editor to format your answer
Transcribed Image Text:JSON Response example when code = BAHRAIN as follows: { "Country": "Bahrain", "Tenps"il ("day": "SUNDAY", "temp"i {"day": "HONDAY", "temp": 35), ("day": "TUESDAYr, "teng": 39), ("day": "WEDNESDAY", "tenp": 37),. ("day"i "THURSDAY", "tenp": 35), ("day"i "FRIDAV", "temp": 34), ("day": "SATURDAY", "teng": 37) 1. Implement find Templ ) function as follows: Sample Eample This function will be called whenever the user change the value of the pull-down menu. This function should contact Ve the Web Service API, sending the selected country code, to Co display the information (country, daily temperatures in the week and average weekly temperature) inside the div tag whose id -result as shown in the example on the right. Country ahraln In addition, the country name and the average temperatures should be saved as one JS object inside an array in a local storage. Whenever new request is made, the countrylaverage will be saved and added to the array inside the local storage (duplicates is allowed). 1. SUNDAY Temp is 37 2. MONDAY Temp is 35 3. TUESDAY Temp is 39 4. WEDNESDAY Temp is 37 5. THURSDAY Tenp is 35 6. FRIDAY Temp is 34 7. SATURDAY Temp is 37 Average Temp M.28571428571428s (Tip: define JS Object with Country/Average properties) and then push it inside the array) Use the editor to format your answer
Expert Solution
steps

Step by step

Solved in 3 steps

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY