I am supposed to show low and hight temperatures how do I do this??! I included my code please help me..

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question
I am supposed to show low and hight temperatures how do I do this??! I included my code please help me..
File Edit Find View Navigate Debug Help
Working File: Q
rainbow.c
placeholder').html
placeholder2.html
forecasts.html
example11-096.js
example11-09a.js
example11-09.htm
forecast2.j
forecas1.js
Assign 5 Working
images
forecast.js
forecast2.js
forecasts.html
index.html
placeholder1.html
placeholder2.html
rainbow.css
1 // display Vancouver date and time
2 var vancTime = getDateByOffset(-8);
3 var elem = document.getElementById("vancTime");
4
5 elem.innerHTML = vancTime;
6
7
8
// display the forecast
var elem=
9 displayForecast (elem, vanc Time);
10
11
14
15
12
// display Toronto date and time
13 var torTime = getDateByoffset(-6);
20
20
16
17 // display the forecast
18 elem = document.getElementById("tor Forecast");
19 displayForecast (elem, torTime);
21
24
24
24
var winTime = getDateByOffset(-7);
22
var elem= document.getElementById("winTime");
22
23 elem.innerHTML = winTime;
forecast2.js (Assign 5 Working) - Brackets
25 // display the forecast
26 var elem = document.getElementById("winForecast");
27 displayForecast (elem, winTime);
28
29
37 ▼
38
39
40
elem = document.getElementById("torTime");
elem.innerHTML = torTime;
30 ▼ /*
31 Create a new Date object for each of the 5 forecasts, then extract the day of the
week and display it. You can change the number of forecasts to whatever suits your
needs.
32
33
34 function displayForecast (divElem, current Date)
35 ▾ {
36
41
42 }
43
document.getElementById("vancForecast");
54
66
55
52
53 }
56
56
59
60
44 ▼ /*
45 Return a low temperature using the Math.random method.
46 */
47
48
49 ▾ {
50
51
52
52
}
61 {
62
62
for (var i= 1; i <= 3; i++)
{
63 }
64
65
66
function get Low Temp()
return "<span style='margin-left:15px'>Low 0&deg; C </span>";
var forecast = getDateForForecast (currentDate, i);
dayOfWeek
forecast.getDay();
divElem.innerHTML = weekdays [dayOfWeek] + ":" + getLowTemp() getHighTemp ()
+ "<br>";
57▼ /*
58
58
Return a high temperature using the Math.random method.
function getHighTemp()
return "<span style='margin-left: 25px'>High 0&deg; C </span>";
Transcribed Image Text:File Edit Find View Navigate Debug Help Working File: Q rainbow.c placeholder').html placeholder2.html forecasts.html example11-096.js example11-09a.js example11-09.htm forecast2.j forecas1.js Assign 5 Working images forecast.js forecast2.js forecasts.html index.html placeholder1.html placeholder2.html rainbow.css 1 // display Vancouver date and time 2 var vancTime = getDateByOffset(-8); 3 var elem = document.getElementById("vancTime"); 4 5 elem.innerHTML = vancTime; 6 7 8 // display the forecast var elem= 9 displayForecast (elem, vanc Time); 10 11 14 15 12 // display Toronto date and time 13 var torTime = getDateByoffset(-6); 20 20 16 17 // display the forecast 18 elem = document.getElementById("tor Forecast"); 19 displayForecast (elem, torTime); 21 24 24 24 var winTime = getDateByOffset(-7); 22 var elem= document.getElementById("winTime"); 22 23 elem.innerHTML = winTime; forecast2.js (Assign 5 Working) - Brackets 25 // display the forecast 26 var elem = document.getElementById("winForecast"); 27 displayForecast (elem, winTime); 28 29 37 ▼ 38 39 40 elem = document.getElementById("torTime"); elem.innerHTML = torTime; 30 ▼ /* 31 Create a new Date object for each of the 5 forecasts, then extract the day of the week and display it. You can change the number of forecasts to whatever suits your needs. 32 33 34 function displayForecast (divElem, current Date) 35 ▾ { 36 41 42 } 43 document.getElementById("vancForecast"); 54 66 55 52 53 } 56 56 59 60 44 ▼ /* 45 Return a low temperature using the Math.random method. 46 */ 47 48 49 ▾ { 50 51 52 52 } 61 { 62 62 for (var i= 1; i <= 3; i++) { 63 } 64 65 66 function get Low Temp() return "<span style='margin-left:15px'>Low 0&deg; C </span>"; var forecast = getDateForForecast (currentDate, i); dayOfWeek forecast.getDay(); divElem.innerHTML = weekdays [dayOfWeek] + ":" + getLowTemp() getHighTemp () + "<br>"; 57▼ /* 58 58 Return a high temperature using the Math.random method. function getHighTemp() return "<span style='margin-left: 25px'>High 0&deg; C </span>";
"Current, Accurate, and Global Weather Updates."
Home | Forecasts | Severe Weather | Gallery | Contact
Forecasts:
Current Vancouver time:
Tue Nov 22 2022 18:31:32 GMT-0800 (Pacific Standard Time)
Vancouver forecasts:
Q Search
Wednesday: Low 0°C
Thursday: Low 0°C
Friday: Low 0°C
High 0°C
Current Toronto time:
Tue Nov 22 2022 20:31:32 GMT-0800 (Pacific Standard Time)
Wednesday: Low 0°C
Thursday:
Low 0°C
Friday: Low 0°C
High 0°C
High 0°C
Toronto forecasts:
Wednesday: Low 0°C
Thursday: Low 0°C
Friday: Low 0°C
High 0°C
High 0°C
Current Winnipeg time:
Tue Nov 22 2022 19:31:32 GMT-0800 (Pacific Standard Time)
Winnipeg forecasts:
High 0°C
High 0°C
High 0°C
High 0°C
X
Ps
Transcribed Image Text:"Current, Accurate, and Global Weather Updates." Home | Forecasts | Severe Weather | Gallery | Contact Forecasts: Current Vancouver time: Tue Nov 22 2022 18:31:32 GMT-0800 (Pacific Standard Time) Vancouver forecasts: Q Search Wednesday: Low 0°C Thursday: Low 0°C Friday: Low 0°C High 0°C Current Toronto time: Tue Nov 22 2022 20:31:32 GMT-0800 (Pacific Standard Time) Wednesday: Low 0°C Thursday: Low 0°C Friday: Low 0°C High 0°C High 0°C Toronto forecasts: Wednesday: Low 0°C Thursday: Low 0°C Friday: Low 0°C High 0°C High 0°C Current Winnipeg time: Tue Nov 22 2022 19:31:32 GMT-0800 (Pacific Standard Time) Winnipeg forecasts: High 0°C High 0°C High 0°C High 0°C X Ps
Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Adobe Flash
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education