Skip to content

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.

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