Seems no need to assign 'lastItem' in the loop because we already knows 'lastItem' at first.