docs(ArrayBuffer): add conversion demos

This commit is contained in:
waiting
2017-10-14 12:01:59 +08:00
parent 0f0408563d
commit 2a82f81022
+4
View File
@@ -273,6 +273,10 @@ const typedArray = new Uint8Array([1, 2, 3, 4]);
TypedArray数组也可以转换回普通数组。
```javascript
const normalArray = [...typedArray];
// or
const normalArray = Array.from(typedArray);
// or
const normalArray = Array.prototype.slice.call(typedArray);
```