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 #1

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

Answer #1

wants to merge 2 commits into from

Conversation

hollisjamison
Copy link

No description provided.

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.

Very nice use of additional concepts, methods, etc. Great unique solutions here. Excellent work.

if (inputLineup.length > 9) return false


// calculate our total salary, if it's more than %45,000 return false and exit function
Copy link
Member

Choose a reason for hiding this comment

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

Simple and accurate. Nice work!

// make an array of every result we are looking for
const allResults = array.map(array => array[propertyName])
// now trim all results and get each unique value
const uniqueResults = [...new Set(allResults)]
Copy link
Member

Choose a reason for hiding this comment

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

Nice use of Set


});

// now check our array to see if there are more then allowed
Copy link
Member

Choose a reason for hiding this comment

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

Great use of max

let otherArray = players.filter(player => player != 'OF')

// now we check if our OF count is correct and our players are all unique positions and there are 6 of them
// if all 3 is true then we have 3 OF and a P, C, 1B, 2B, 3B, and SS
Copy link
Member

Choose a reason for hiding this comment

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

Clever solution!

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