Skip to content

Commit c10c38e

Browse files
authored
fix(curriculum): renamed forecast->weather in Build a Weather App (freeCodeCamp#60877)
1 parent 44e7343 commit c10c38e

File tree

1 file changed

+29
-29
lines changed

1 file changed

+29
-29
lines changed

curriculum/challenges/english/25-front-end-development/lab-weather-app/66f12a88741aeb16b9246c59.md

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ You will use a weather API. The output data has the following format:
4141

4242
**User Stories:**
4343

44-
1. You should have a `button` element with an `id` of `get-forecast`.
44+
1. You should have a `button` element with an `id` of `get-weather`.
4545

4646
1. You should have a `select` element with seven `option` elements nested within it. The first option should have an empty string as its text and `value` attribute. The rest should have the following for their text and values (with the value being lowercase):
4747

@@ -64,13 +64,13 @@ You will use a weather API. The output data has the following format:
6464

6565
- You should have an element with the id `humidity` for displaying the amount of humidity in air.
6666

67-
- You should have an element with the id `wind` element for displaying the wind speed.
67+
- You should have an element with the id `wind` for displaying the wind speed.
6868

69-
- You should have an element with the id `wind-gust` element for displaying the wind gust.
69+
- You should have an element with the id `wind-gust` for displaying the wind gust.
7070

71-
- You should have an element with the id `weather-main` element for displaying the main weather type.
71+
- You should have an element with the id `weather-main` for displaying the main weather type.
7272

73-
- You should have an element with the id `location` element for displaying the current location.
73+
- You should have an element with the id `location` for displaying the current location.
7474

7575
1. You should have an asynchronous function named `getWeather` that fetches the weather information from the `https://weather-proxy.freecodecamp.rocks/api/city/<CITY>` API and returns it. Note that this API returns data using the metric system, that means m/s for wind speed, and Celsius for the temperature.
7676

@@ -303,10 +303,10 @@ const helper = (wobj) => ({
303303

304304
# --hints--
305305

306-
You should have a `button` element with an `id` of `get-forecast`.
306+
You should have a `button` element with an `id` of `get-weather`.
307307

308308
```js
309-
assert.exists(document.querySelector('button#get-forecast'));
309+
assert.exists(document.querySelector('button#get-weather'));
310310
```
311311

312312
You should have a `select` element.
@@ -344,7 +344,7 @@ You should have an `img` element with the id `weather-icon` for displaying the w
344344
```js
345345
async () => {
346346
document.querySelector('select').value = 'chicago';
347-
document.querySelector('#get-forecast').click();
347+
document.querySelector('#get-weather').click();
348348
await new Promise(resolve => setTimeout(resolve, 1));
349349
assert.exists(document.querySelector('img#weather-icon'));
350350
};
@@ -355,7 +355,7 @@ You should have an element with the id `main-temperature` for displaying the mai
355355
```js
356356
async () => {
357357
document.querySelector('select').value = 'london';
358-
document.querySelector('#get-forecast').click();
358+
document.querySelector('#get-weather').click();
359359
await new Promise(resolve => setTimeout(resolve, 1));
360360
assert.exists(document.querySelector('#main-temperature'));
361361
};
@@ -366,7 +366,7 @@ You should have an element with the id `feels-like` for displaying what the temp
366366
```js
367367
async () => {
368368
document.querySelector('select').value = 'london';
369-
document.querySelector('#get-forecast').click();
369+
document.querySelector('#get-weather').click();
370370
await new Promise(resolve => setTimeout(resolve, 1));
371371
assert.exists(document.querySelector('#feels-like'));
372372
};
@@ -377,51 +377,51 @@ You should have an element with the id `humidity` for displaying the amount of h
377377
```js
378378
async () => {
379379
document.querySelector('select').value = 'london';
380-
document.querySelector('#get-forecast').click();
380+
document.querySelector('#get-weather').click();
381381
await new Promise(resolve => setTimeout(resolve, 1));
382382
assert.exists(document.querySelector('#humidity'));
383383
};
384384
```
385385

386-
You should have an element with the id `wind` element for displaying the wind speed.
386+
You should have an element with the id `wind` for displaying the wind speed.
387387

388388
```js
389389
async () => {
390390
document.querySelector('select').value = 'new york';
391-
document.querySelector('#get-forecast').click();
391+
document.querySelector('#get-weather').click();
392392
await new Promise(resolve => setTimeout(resolve, 1));
393393
assert.exists(document.querySelector('#wind'));
394394
};
395395
```
396396

397-
You should have an element with the id `wind-gust` element for displaying the wind gust.
397+
You should have an element with the id `wind-gust` for displaying the wind gust.
398398

399399
```js
400400
async () => {
401401
document.querySelector('select').value = 'new york';
402-
document.querySelector('#get-forecast').click();
402+
document.querySelector('#get-weather').click();
403403
await new Promise(resolve => setTimeout(resolve, 1));
404404
assert.exists(document.querySelector('#wind-gust'));
405405
};
406406
```
407407

408-
You should have an element with the id `weather-main` element for displaying the main weather type.
408+
You should have an element with the id `weather-main` for displaying the main weather type.
409409

410410
```js
411411
async () => {
412412
document.querySelector('select').value = 'new york';
413-
document.querySelector('#get-forecast').click();
413+
document.querySelector('#get-weather').click();
414414
await new Promise(resolve => setTimeout(resolve, 1));
415415
assert.exists(document.querySelector('#weather-main'));
416416
};
417417
```
418418

419-
You should have an element with the id `location` element for displaying the current location.
419+
You should have an element with the id `location` for displaying the current location.
420420

421421
```js
422422
async () => {
423423
document.querySelector('select').value = 'new york';
424-
document.querySelector('#get-forecast').click();
424+
document.querySelector('#get-weather').click();
425425
await new Promise(resolve => setTimeout(resolve, 1));
426426
assert.exists(document.querySelector('#location'));
427427
};
@@ -504,7 +504,7 @@ async () => {
504504
try {
505505
const city = 'new york';
506506
document.querySelector('select').value = city;
507-
document.querySelector('#get-forecast').click();
507+
document.querySelector('#get-weather').click();
508508

509509
// fetch the expected values from the API to confront
510510
const body = await fetch(
@@ -541,7 +541,7 @@ async () => {
541541
try {
542542
const city = 'chicago';
543543
document.querySelector('select').value = city;
544-
document.querySelector('#get-forecast').click();
544+
document.querySelector('#get-weather').click();
545545

546546
// fetch the expected values from the API to confront
547547
const body = await fetch(
@@ -578,7 +578,7 @@ async () => {
578578
try {
579579
const city = 'london';
580580
document.querySelector('select').value = city;
581-
document.querySelector('#get-forecast').click();
581+
document.querySelector('#get-weather').click();
582582

583583
// fetch the expected values from the API to confront
584584
const body = await fetch(
@@ -615,7 +615,7 @@ async () => {
615615
try {
616616
const city = 'tokyo';
617617
document.querySelector('select').value = city;
618-
document.querySelector('#get-forecast').click();
618+
document.querySelector('#get-weather').click();
619619

620620
// fetch the expected values from the API to confront
621621
const body = await fetch(
@@ -652,7 +652,7 @@ async () => {
652652
try {
653653
const city = 'los angeles';
654654
document.querySelector('select').value = city;
655-
document.querySelector('#get-forecast').click();
655+
document.querySelector('#get-weather').click();
656656

657657
// fetch the expected values from the API to confront
658658
const body = await fetch(
@@ -726,7 +726,7 @@ async () => {
726726
};
727727
const city = 'paris';
728728
document.querySelector('select').value = city;
729-
document.querySelector('#get-forecast').click();
729+
document.querySelector('#get-weather').click();
730730
await new Promise(resolve => setTimeout(resolve, 1));
731731
assert.include(testArr[0], 'Something went wrong, please try again later');
732732
assert.lengthOf(testArr, 1);
@@ -818,7 +818,7 @@ async () => {
818818
<option value="tokyo">Tokyo</option>
819819
<option value="london">London</option>
820820
</select>
821-
<button id="get-forecast">Get Forecast</button>
821+
<button id="get-weather">Get Weather</button>
822822
</div>
823823

824824
<script type="text/javascript" src="script.js"></script>
@@ -878,7 +878,7 @@ body {
878878
font-size: 1.25em;
879879
}
880880

881-
#get-forecast {
881+
#get-weather {
882882
font-size: 1.25em;
883883
height: 50px;
884884
width: 200px;
@@ -1024,7 +1024,7 @@ body {
10241024
```
10251025

10261026
```js
1027-
const getForecastBtn = document.getElementById('get-forecast');
1027+
const getWeatherBtn = document.getElementById('get-weather');
10281028
const selectEl = document.getElementById('location-selector');
10291029

10301030
const weatherInfoEl = document.getElementById('weather-info');
@@ -1038,7 +1038,7 @@ const mainEl = document.getElementById('weather-main');
10381038
const locationEl = document.getElementById('location');
10391039
const arrowEl = document.getElementById('compass-arrow');
10401040

1041-
getForecastBtn.addEventListener(
1041+
getWeatherBtn.addEventListener(
10421042
'click',
10431043
() => selectEl.value && showWeather(selectEl.value)
10441044
);

0 commit comments

Comments
 (0)