From c09df52d6a35b6a419b3cb007c37b5a91f0d3471 Mon Sep 17 00:00:00 2001 From: icorvus Date: Sun, 23 Jan 2022 20:50:36 +0100 Subject: [PATCH 1/2] fixed semicolon --- getTheTitles/getTheTitles.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/getTheTitles/getTheTitles.js b/getTheTitles/getTheTitles.js index 1888c2b..38288ab 100644 --- a/getTheTitles/getTheTitles.js +++ b/getTheTitles/getTheTitles.js @@ -1,5 +1,5 @@ const getTheTitles = function(array) { - return array.map(book => book.title) + return array.map(book => book.title); }; module.exports = getTheTitles; From de40b279dfbe7a0aca09b2c3c0de95a352fe20f7 Mon Sep 17 00:00:00 2001 From: icorvus Date: Sun, 23 Jan 2022 21:17:39 +0100 Subject: [PATCH 2/2] fixed semicolon --- findTheOldest/findTheOldest.js | 6 +++--- helloWorld/helloWorld.js | 2 +- leapYears/leapYears.js | 2 +- repeatString/repeatString.js | 8 ++++---- reverseString/reverseString.js | 2 +- tempConversion/tempConversion.js | 4 ++-- 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/findTheOldest/findTheOldest.js b/findTheOldest/findTheOldest.js index 1c4714d..e13df39 100644 --- a/findTheOldest/findTheOldest.js +++ b/findTheOldest/findTheOldest.js @@ -1,8 +1,8 @@ const findTheOldest = function(array) { return array.reduce((oldest, currentPerson) => { - const oldestAge = getAge(oldest.yearOfBirth, oldest.yearOfDeath) - const currentAge = getAge(currentPerson.yearOfBirth, currentPerson.yearOfDeath) - return oldestAge < currentAge ? currentPerson : oldest + const oldestAge = getAge(oldest.yearOfBirth, oldest.yearOfDeath); + const currentAge = getAge(currentPerson.yearOfBirth, currentPerson.yearOfDeath); + return oldestAge < currentAge ? currentPerson : oldest; }) }; diff --git a/helloWorld/helloWorld.js b/helloWorld/helloWorld.js index b542f3b..1a32052 100644 --- a/helloWorld/helloWorld.js +++ b/helloWorld/helloWorld.js @@ -1,5 +1,5 @@ const helloWorld = function() { - return 'Hello, World!' + return 'Hello, World!'; }; module.exports = helloWorld; diff --git a/leapYears/leapYears.js b/leapYears/leapYears.js index 0967efa..3f9b180 100644 --- a/leapYears/leapYears.js +++ b/leapYears/leapYears.js @@ -1,5 +1,5 @@ const leapYears = function(year) { - return year % 4 === 0 && ( year % 100 !== 0 || year % 400 === 0) + return year % 4 === 0 && ( year % 100 !== 0 || year % 400 === 0); }; module.exports = leapYears; diff --git a/repeatString/repeatString.js b/repeatString/repeatString.js index de02551..fb92c60 100644 --- a/repeatString/repeatString.js +++ b/repeatString/repeatString.js @@ -1,10 +1,10 @@ const repeatString = function(word, times) { - if (times < 0) return 'ERROR' - let string = '' + if (times < 0) return 'ERROR'; + let string = ''; for (let i = 0; i < times; i++) { - string += word + string += word; } - return string + return string; }; module.exports = repeatString; diff --git a/reverseString/reverseString.js b/reverseString/reverseString.js index 0c6fbb1..76d8d4d 100644 --- a/reverseString/reverseString.js +++ b/reverseString/reverseString.js @@ -1,5 +1,5 @@ const reverseString = function(string) { - return string.split('').reverse().join('') + return string.split('').reverse().join(''); }; module.exports = reverseString; diff --git a/tempConversion/tempConversion.js b/tempConversion/tempConversion.js index e3618e8..13430a7 100644 --- a/tempConversion/tempConversion.js +++ b/tempConversion/tempConversion.js @@ -1,9 +1,9 @@ const ftoc = function(f) { - return Math.round((f - 32) * (5/9) * 10) / 10 + return Math.round((f - 32) * (5/9) * 10) / 10; }; const ctof = function(c) { - return Math.round(((c * 9/5) + 32) * 10) / 10 + return Math.round(((c * 9/5) + 32) * 10) / 10; };