哪些 JavaScript 数组函数正在发生变化? [英] Which JavaScript Array functions are mutating?
本文介绍了哪些 JavaScript 数组函数正在发生变化?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在用 JavaScript 编写一个数组派生类,需要知道要重载哪些函数,以便知道对数组所做的更改.
I am writing an Array-derived class in JavaScript and need to know which functions to overload so that I can be aware of changes made to the array.
我知道 Array.push()
和 Array.splice()
正在发生变异.是否有任何其他人的明确清单?
I know Array.push()
and Array.splice()
are mutating. Is there a definitive list of any others?
推荐答案
您可以在 MDN 上找到该列表 Mutator 方法(以及 Accessor 和 迭代 方法):
You can find the list on MDN as Mutator methods (along with Accessor and Iteration methods):
这篇关于哪些 JavaScript 数组函数正在发生变化?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文