企业🤖AI智能体构建引擎,智能编排和调试,一键部署,支持知识库和私有化部署方案 广告
>ES5 实现: ~~~ function unique(arr) { var res = arr.filter(function(item, index, array) { return array.indexOf(item) === index }) return res } ~~~ >ES6 实现: ~~~ var unique = arr => [...new Set(arr)] ~~~