Remove Duplicate Javascript Array Length