- begin :The slicing begins from Zero-based byte index.
- end : The slicing ends at this index byte. The new ArrayBuffer will contain all the contents, if the end is found unspecified. It must be valid index range specified for the current array. If the new ArrayBuffer length is found negative then it is fixed with zero.
The property returns a new ArrayBuffer object.
Input : uint32View = 31 myBuffer.slice(4, 12) sliced_bu Output : 31 Input : uint32View = 32 myBuffer.slice(4, 12) sliced_bu Output : 32
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.