题目描述在数组 arr 末尾添加元素 item。不要直接修改数组 arr,结果返回新的数组
考虑使用浅拷贝实现。
ES6 写法
function append(arr, item) { return [...arr, item] }