let arr = nums.sort((a, b) => a-b)
let arr1 = nums.map(item => item*item)
let target = arr1.sort((a, b) => a-b) // arr1被修改
let arr = nums.sort((a, b) => a-b)
let arr1 = nums.map(item => item*item)
let target = arr1.slice().sort((a, b) => a-b) // arr1不被修改