Skip to content

Commit 94656ce

Browse files
committed
docs(arrayBuffer): edit TypedArray.from()
1 parent 0199e31 commit 94656ce

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/arraybuffer.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -660,7 +660,7 @@ Int16Array.from(Int8Array.of(127, 126, 125), x => 2 * x)
660660
// Int16Array [ 254, 252, 250 ]
661661
```
662662

663-
上面的例子中,`from`方法没有发生溢出,这说明遍历是针对新生成的16位整数数组,而不是针对原来的8位整数数组。也就是说,`from`会将第一个参数指定的TypedArray数组,拷贝到另一段内存之中(占用内存从3字节变为6字节),然后再进行处理
663+
上面的例子中,`from`方法没有发生溢出,这说明遍历不是针对原来的8位整数数组。也就是说,`from`会将第一个参数指定的TypedArray数组,拷贝到另一段内存之中,处理之后再将结果转成指定的数组格式
664664

665665
## 复合视图
666666

0 commit comments

Comments
 (0)