Skip to content
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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Answer #7

wants to merge 2 commits into from

Conversation

xworld2000
Copy link

Very effective practice thanks!

@xworld2000 xworld2000 requested a review from johnny-rice July 16, 2020 14:03
Copy link
Member

@johnny-rice johnny-rice left a 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
Copy link
Member

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) {
Copy link
Member

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 = () => {
Copy link
Member

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 = () => {
Copy link
Member

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 = () => {
Copy link
Member

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) => {
Copy link
Member

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 = () => {
Copy link
Member

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) {
Copy link
Member

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) => {
Copy link
Member

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) => {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ very nicely done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants