Skip to main content
Journey Uncommon Logo
JourneyUncommon
mediumRubyfreeze and immutabilitySingle-choice MCQ

Given a frozen array of mutable strings, what happens with these two lines?

arr = [+"a", +"b"].freeze arr[0] << "X" arr << "c"