ArrayBuffer
Elements of arrays can be of any type, such as strings, numbers, objects, and so on. Arrays can grow dynamically. The problem with arrays is that they are slow in terms of execution time and occupy more memory. This causes issues while developing applications that require too much computation and deal with plenty of numbers. Therefore array buffers were introduced to tackle this issue.
An array buffer is a collection of 8-bit blocks in memory. Every block is an array buffer element. The size of an array buffer needs to be decided while creating it; therefore, it cannot grow dynamically. Array buffers can only store numbers. All blocks are initialized to the number 0 on the creation of an array buffer.
An array buffer object is ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access