Skip to main content
Journey Uncommon Logo
JourneyUncommon
mediumRubyStruct and DataSingle-choice MCQ

How do you create a modified copy of a frozen `Data` instance with one field changed?

Coord = Data.define(:lat, :lng) c = Coord.new(lat: 1, lng: 2)