fixed semicolon
This commit is contained in:
parent
c09df52d6a
commit
de40b279df
|
@ -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;
|
||||
})
|
||||
};
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
const helloWorld = function() {
|
||||
return 'Hello, World!'
|
||||
return 'Hello, World!';
|
||||
};
|
||||
|
||||
module.exports = helloWorld;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
const reverseString = function(string) {
|
||||
return string.split('').reverse().join('')
|
||||
return string.split('').reverse().join('');
|
||||
};
|
||||
|
||||
module.exports = reverseString;
|
||||
|
|
|
@ -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;
|
||||
};
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue