Skip to content

Commit 2a82f81

Browse files
committed
docs(ArrayBuffer): add conversion demos
1 parent 0f04085 commit 2a82f81

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

docs/arraybuffer.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -273,6 +273,10 @@ const typedArray = new Uint8Array([1, 2, 3, 4]);
273273
TypedArray数组也可以转换回普通数组。
274274

275275
```javascript
276+
const normalArray = [...typedArray];
277+
// or
278+
const normalArray = Array.from(typedArray);
279+
// or
276280
const normalArray = Array.prototype.slice.call(typedArray);
277281
```
278282

0 commit comments

Comments
 (0)