Skip to content

Commit 9f1ffbc

Browse files
Fixed some small bugs
1 parent 838e450 commit 9f1ffbc

File tree

3 files changed

+18
-6
lines changed

3 files changed

+18
-6
lines changed

12-Numbers-Dates-Timers-Bankist/final/script.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -357,7 +357,11 @@ btnClose.addEventListener('click', function (e) {
357357
let sorted = false;
358358
btnSort.addEventListener('click', function (e) {
359359
e.preventDefault();
360-
displayMovements(currentAccount.movements, !sorted);
360+
// BUG in video:
361+
// displayMovements(currentAccount.movements, !sorted);
362+
363+
// FIX:
364+
displayMovements(currentAccount, !sorted);
361365
sorted = !sorted;
362366
});
363367

14-OOP/final/script.js

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ console.log(jessica.__proto__ === PersonCl.prototype);
182182
jessica.greet();
183183
184184
// 1. Classes are NOT hoisted
185-
// 2. Classes are first-class citizes
185+
// 2. Classes are first-class citizens
186186
// 3. Classes are executed in strict mode
187187
188188
const walter = new PersonCl('Walter White', 1965);
@@ -468,11 +468,15 @@ StudentProto.init = function (firstName, birthYear, course) {
468468
};
469469
470470
StudentProto.introduce = function () {
471-
console.log(`My name is ${this.fullName} and I study ${this.course}`);
471+
// BUG in video:
472+
// console.log(`My name is ${this.fullName} and I study ${this.course}`);
473+
474+
// FIX:
475+
console.log(`My name is ${this.firstName} and I study ${this.course}`);
472476
};
473477
474478
const jay = Object.create(StudentProto);
475-
jay.init('Jay', 2010, 'Compuetr Science');
479+
jay.init('Jay', 2010, 'Computer Science');
476480
jay.introduce();
477481
jay.calcAge();
478482
@@ -644,4 +648,3 @@ rivian
644648
645649
console.log(rivian.speedUS);
646650
*/
647-

16-Asynchronous/final/script.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -481,7 +481,12 @@ const whereAmI = async function () {
481481
const res = await fetch(
482482
`https://restcountries.eu/rest/v2/name/${dataGeo.country}`
483483
);
484-
if (!resGeo.ok) throw new Error('Problem getting country');
484+
485+
// BUG in video:
486+
// if (!resGeo.ok) throw new Error('Problem getting country');
487+
488+
// FIX:
489+
if (!res.ok) throw new Error('Problem getting country');
485490
486491
const data = await res.json();
487492
console.log(data);

0 commit comments

Comments
 (0)