Compact and clear : compact « Array « Ruby






Compact and clear


a = ['a','b','c']
p a.compact 
p a.compact!
p a.clear   

 

Related examples in the same category