Let's say we have a line of code that sums up all of the billable_weeks
total hours, it would look something like this:
billable_weeks.map(&:total_hours).sum
What role does the &
play in the above code? Couldn't we just write it as billable_weeks.map(:total_hours).sum
?
Please help clear this up for me!