-
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
Answer #7
base: master
Are you sure you want to change the base?
Answer #7
Conversation
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.
Excellent work ✅
I like to see the use of what we learned this week. Quick turn around on using it. Solid.
|
||
/* | ||
@Challenge 01 - Write a function named `increaseLevel` that adds 1 to any number value passed in as a parameter | ||
@Example - Sending the function a value of 10 will result in 11 | ||
@Test - Write a console.log that shows the value of `increaseLevel(10)` | ||
*/ | ||
|
||
/* | ||
increaseLevel = n => n + 1 |
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.
Whoa!! Nice work here using the newest code and the implicit return.
/* | ||
@Challenge 03 - Write a function named `showMeTheMoney` that loops from 1 to 200. | ||
makeEchoes = n => { | ||
while (n) { |
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.
|
||
/* | ||
@Challenge 04 - Write a function named `showTheFifties` that loops from 1 to 200. | ||
showMeTheMoney = () => { |
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.
✅
Use a condition in the loop to console.log the number when it is over 49 and under 60 | ||
@Example - Expect to see 50, 51, 52, 53, 54, 55, 56, 57, 58, 59 in the terminal | ||
@Test - Make a function call of `showTheFifties()` | ||
*/ | ||
|
||
/* | ||
showTheFifties = () => { |
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.
✅
@Challenge 05 - Write a function that returns an array that is named `getTheTwenties` that loops from 1 to 60 and returns an array of all the 20's | ||
Use a condition in the loop to push to an array when the number is greater than or equal to 20 and under 30 | ||
@Example - Expect an array returned with value of [20, 21, 22, 23, 24, 25, 26, 27, 28, 29] | ||
@Test - console.log the result of a function call of `getTheTwenties()` and expect to see an array value of [20, 21, 22, 23, 24, 25, 26, 27, 28, 29] | ||
*/ | ||
|
||
/* | ||
getTheTwenties = () => { |
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.
✅
@Challenge 06 - Write a function that accepts an array names. Name the function `sayHiToJim` that loops through the array of names. | ||
Use a condition in the loop to check if the name is "Jim". If the name is "Jim" console.log a message to say "Hi Jim" | ||
Use conditional logic to console.log "Ignoring " and then the name of the person being ignored. | ||
@Example - Expect to see "Ignorning Jane" and "Ignoring Anita Bath" when the function is given an array of ["Jane", "Anita Bath"] | ||
@Test01 - Make a function call `sayHiToJim(["Jane", "Anita Bath"])` | ||
@Test02 - Make a function call `sayHiToJim(["Jane", "Anita Bath", "Jim", "Sam Sung"])` | ||
*/ | ||
sayHiToJim = (names) => { |
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 good. Might be missing code for: "Expect to see "Ignorning Jane" and "Ignoring Anita Bath" when the function is given an array of ["Jane", "Anita Bath"]"
@Test - console.log the result of a function call to `getEveryLittleThing()` and expect to see an array of three objects | ||
*/ | ||
getEveryLittleThing = () => { |
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.
✅ I like the updated values
/* | ||
showLetterGrades = () => { | ||
const letters = ["H", "G", "F", "E", "D", "C", "B", "A"] | ||
const retVal = letters.filter(function (letter) { |
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.
✅ using the new material right away. nice.
|
||
|
||
/* | ||
trackGallonsUsed = (gallons) => { |
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.
✅
@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])` | ||
*/ | ||
getHighScore = (scores) => { |
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.
✅ very nicely done.
Very effective practice thanks!