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

complete LetsDrill challenge #100

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

LeslieKornes
Copy link

@jaybobo here you are


#Put your code here!

if integer.between?(90,100)
Copy link
Member

Choose a reason for hiding this comment

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

i haven't seen anyone use .between to solve this before i dont think. cool!

other options here might be >= or...

a range...

case integer
when 90..100
  ...
end

Copy link
Member

@jaybobo jaybobo left a comment

Choose a reason for hiding this comment

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

Looks good. see notes.


end

def shortest_string(array)

#Put your code here!
array.sort_by(&:length).first
Copy link
Member

Choose a reason for hiding this comment

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

cool, use of Symbol#to_proc!

pro-tip: .min_by will let you drop your use of .first and make this even more concise.

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