IT博客汇
  • 首页
  • 精华
  • 技术
  • 设计
  • 资讯
  • 扯淡
  • 权利声明
  • 登录 注册

    Magic spell for unique arrays

    luoyjx发表于 2017-02-18 00:21:37
    love 0
    const arr = [1,1,3];
    const a2 = [...new Set(arr)];  // [1,3]
    

    https://twitter.com/_ericelliott/status/832065642987524096



沪ICP备19023445号-2号
友情链接