add string to array ruby code example Example: how to add to an array ruby array.push('new element') # OR array << 'new element'