Skip to content

Instantly share code, notes, and snippets.

@changs1986
Created November 22, 2016 02:47
Show Gist options
  • Select an option

  • Save changs1986/3f0dea7ce07c0d56f5cb06d654840392 to your computer and use it in GitHub Desktop.

Select an option

Save changs1986/3f0dea7ce07c0d56f5cb06d654840392 to your computer and use it in GitHub Desktop.
js数组遍历删除元素
for (var i = array.length - 1; i >= 0; i--) {
if (array[i].status == 1) {
array.splice(i, 1);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment