Hi,
You can use Splice method to remove the last object.
Store your stuff as an array, find the index of the element which you wana delete and use splice method over it.
var arrayMy=[1,2,3,4];
var x=arrayMy.indexOf(4);
arrayMy.Splice(x,1);
hope it helps.
-Anurag