Javascript Empty Array Element Deletion