splice(index,howmany) - This solution sounds good. But This howmany will work only for the positive array index. To remove last two items or three items use the index itself.
For example, splice(-2) to remove last two items. splice(-3) for removing last three items.