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/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; 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; };