标签云

微信群

扫码加入我们

WeChat QR Code

如何删除在JavaScript中的[复制]数组的特定元素

This question already has an answer here:

If I have array, for example : a=["a","b","c"]. I need something like a.remove("a");

How can I do this?


Settle Down. I'm coming up with a duplicate for you since you clearly didn't search for yourself.

2018年05月28日18分06秒

You know there is .splice right?

2018年05月27日18分06秒

Yes, I know. But I'm considering that the array can have more than one "a"

2018年05月27日18分06秒

I didn't think of that. Good point. +1

2018年05月27日18分06秒

The array has only unique values !

2018年05月27日18分06秒

this is valid for Array and arraylist both

2018年05月27日18分06秒