-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implements all 10 functions for this week and test scrips that all pass #2
base: master
Are you sure you want to change the base?
Conversation
@@ -99,10 +168,51 @@ | |||
in the terminal | |||
@Test - Make a function call of `trackGallonsUsed(5)` | |||
*/ | |||
function trackGallonsUsed(gallons) { | |||
let consoleLog = [] | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nicely done.
|
||
|
||
/* | ||
@Challenge 10 - Write a function named `getHighScore` that finds the highest value in an array of scores | ||
@Example - Sending the function a value of [1999,2020,3080,1111] will result in 3080 | ||
@Test - Write a console.log that shows the value of `getHighScore([1999,2020,3080,1111])` | ||
*/ | ||
function getHighScore(listOfScores){ | ||
let highScore = 0 | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work here.
console.log(highScore) | ||
return highScore | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like an extra getHighScore
reference sitting on line 206. No harm in it but making note since it is there.
} | ||
|
||
getHighScore | ||
module.exports = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work on these exports using the object syntax and the shorthand key/value syntax.
@@ -4,7 +4,7 @@ | |||
"description": "## The Mission", | |||
"main": "index.js", | |||
"scripts": { | |||
"test": "nodemon index.js" | |||
"test": "mocha" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is outstanding work.
@@ -0,0 +1,23 @@ | |||
const assert = require('assert') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is next level effort. Happy to see it. Outstanding work.
No description provided.