“`参考回答:

可以去重

方法一:indexOf循环去重

方 法二:Object 键值对去重;把数组的值存成 Object 的 key 值,比如 Object[value1] = true,在判断另一个值的时候,如果 Object[value2]存在的话,就说明该值是重复的。

 

“`

Was this helpful?

0 / 0

发表回复 0

Your email address will not be published.