Ruby program to remove the first item from the array

bookmark

arr = [100,101,102,103,104];
item = arr.shift();

print "Array: ",arr,"\n";
print "Removed item: ",item,"\n";

 


Output:

Array: [101, 102, 103, 104]
Removed items: 100