//数组去重 const deduplication = arr => { //arr [1,2,1,2,3] let arrSet = new Set(arr) // arrSet Set:{1,2,3} return [...arrSet] }