copy and delete last element of array javascript code example Example: js array delete last array.pop()