它的JavaScript阵列功能变异? [英] Which JavaScript Array functions are mutating?

查看:111
本文介绍了它的JavaScript阵列功能变异?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我写在JavaScript中的Array派生类,并且需要知道重载哪些功能,这样我可以知道到数组所做的更改。

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列表为<一个href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/prototype#Mutator_methods\">Mutator方法(连同<一个href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/prototype#Accessor_methods\">Accessor和<一个href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/prototype#Iteration_methods\">Iteration方法):

You can find the list on MDN as Mutator methods (along with Accessor and Iteration methods):

这篇关于它的JavaScript阵列功能变异?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆