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