Deleting element of JArray in for

This question already has an answer here:

  • How do I remove a particular element from an array in JavaScript? 62 answers

  • You can do this manually in a better way; when you find a "faulty" element you want to remove, you just shift all other elements to the left thus overriding the one you don't want. But I think there's no need for you to do that. (if you're adamant in this request, comment and I'll provide you with the code for doing so).

    Remove() method does that for you. Most methods for element insertion or removal from collections do work this way: they insert/delete the element at a desired position and shift other elements to the right/left respectively.

    链接地址: http://www.djcxy.com/p/3226.html

    上一篇: 如何从深javascript数组中删除对象?

    下一篇: 在for中删除JArray的元素