TypedArray.prototype.toReversed()
TypedArray
实例的 toReversed()
方法是 reverse()
方法的 copying 对应方法。它返回一个新的类型化数组,其中元素的顺序相反。该方法与 Array.prototype.toReversed()
的算法相同。
¥The toReversed()
method of TypedArray
instances is the copying counterpart of the reverse()
method. It returns a new typed array with the elements in reversed order. This method has the same algorithm as Array.prototype.toReversed()
.
语法
参数
返回值
描述
¥Description
详细信息请参见 Array.prototype.toReversed()
。此方法不是通用的,只能在类型化数组实例上调用。
¥See Array.prototype.toReversed()
for more details. This method is not generic and can only be called on typed array instances.
示例
使用 toReversed()
规范
Specification |
---|
ECMAScript Language Specification # sec-%typedarray%.prototype.toreversed |
浏览器兼容性
BCD tables only load in the browser