Ruby program to remove the last item from the array

bookmark

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

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


Output:

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