Skip to content

Conversation

@kenjelly22
Copy link

Used enumerables to return different sets of data.

Comment on lines +65 to +68
new_arr = spicy_foods.map do |food|
food[:heat_level]
end
new_arr.reduce(0, :+) / new_arr.length

Choose a reason for hiding this comment

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

This would be a good candidate for #sum

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