去重数组

function dedupe(array) {

  return Array.from(new Set(array));

}

dedupe([1, 1, 2, 3]) // [1, 2, 3]
原文地址:https://www.cnblogs.com/echolife/p/15011406.html