implemented [].lastIndexOf
fixed typo.
implemented [].shift
merge
fixed merge.