JS prototype 属性的总结

🌙
手机阅读
本文目录结构

**TypedArray****.prototype**属性表示TypedArray构造器的原型.

TypedArray.prototype 属性的属性特性:
writable
enumerable
configurable

描述

TypedArray 实例继承自 TypedArray.prototype. 你可以通过该原型对象为所有的类型化数组(typed array types)实例添加属性和方法.

关于继承的更多的信息请参见关于TypedArray 的描述.

属性

TypedArray.prototype.constructor

返回创建实例原型的构造函数.这是相应的typed array type的默认的构造函数.

TypedArray.prototype.buffer 只读

返回被格式化数组引用的ArrayBuffer. 创建时已被固化,因此是只读的.

TypedArray.prototype.byteLength 只读

返回从ArrayBuffer读取的字节长度. 创建时已被固化,因此是只读的.

TypedArray.prototype.byteOffset 只读

返回从ArrayBuffer读取时的字节偏移量**.**创建时已被固化,因此是只读的.

TypedArray.prototype.length 只读

返回在类型化数组中的元素的数量**.**创建时已被固化,因此是只读的.

methods

TypedArray
TypedArray
BYTES_PER_ELEMENT
length
name
prototype
buffer
byteLength
byteOffset
from()
of()
copyWithin()
entries()
every()
fill()
filter()
find()
findIndex()
forEach()
includes()
indexOf()
join()
keys()
lastIndexOf()
map()
move()
reduce()
reduceRight()
reverse()
set()
slice()
some()
sort()
subarray()
toLocaleString()
toString()
values()
arr[Symbol.iterator]()
Int8Array
Uint8Array
Uint8ClampedArray
Int16Array
Uint16Array
Int32Array
Uint32Array
Float32Array
Float64Array

返回一个包含数组中每个元素的新的数组迭代对象.

规范

规范 状态 备注
[ECMAScript 2015 (6th Edition, ECMA-262)
TypedArray prototype](https://www.ecma-international.org/ecma-262/6.0/#sec-properties-of-the-%typedarrayprototype%-object) Standard Initial definition.
[ECMAScript Latest Draft (ECMA-262)
TypedArray prototype](https://tc39.github.io/ecma262/#sec-properties-of-the-%typedarrayprototype%-object) Draft  

浏览器兼容

We’re converting our compatibility data into a machine-readable JSON format. This compatibility table still uses the old format, because we haven’t yet converted the data it contains.

  • Desktop
  • Mobile
Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari
Basic support 7.0 4.0 (2) 10 11.6 5.1
Feature Android Chrome for Android Firefox Mobile (Gecko) IE Mobile Opera Mobile Safari Mobile
Basic support 4.0 (Yes) 4.0 (2) 10 11.6 4.2

参见

AXIHE / 精选资源

浏览全部教程

面试题

学习网站

前端培训
自己甄别

前端书籍

关于朱安邦

我叫 朱安邦,阿西河的站长,在杭州。

以前是一名平面设计师,后来开始接接触前端开发,主要研究前端技术中的JS方向。

业余时间我喜欢分享和交流自己的技术,欢迎大家关注我的 Bilibili

关注我: Github / 知乎

于2021年离开前端领域,目前重心放在研究区块链上面了

我叫朱安邦,阿西河的站长

目前在杭州从事区块链周边的开发工作,机械专业,以前从事平面设计工作。

2014年底脱产在老家自学6个月的前端技术,自学期间几乎从未出过家门,最终找到了满意的前端工作。更多>

于2021年离开前端领域,目前从事区块链方面工作了