day 1 complete
This commit is contained in:
parent
e07ae80bf5
commit
4ec3d4daaa
@ -14,4 +14,7 @@ for (const calorieData of rawCalories) {
|
||||
parsedCalories.push(total);
|
||||
}
|
||||
|
||||
console.log(Math.max(...parsedCalories));
|
||||
parsedCalories = parsedCalories.sort((n1, n2) => n1 - n2);
|
||||
|
||||
console.log(parsedCalories[parsedCalories.length - 1]);
|
||||
console.log(parsedCalories[parsedCalories.length - 1] + parsedCalories[parsedCalories.length - 2] + parsedCalories[parsedCalories.length - 3]);
|
||||
|
Loading…
Reference in New Issue
Block a user