Skip to content

Conversation

@mpmckenna8
Copy link

Changed the solutions to a couple of the exercises to use the non-deprecated way to create node buffers. It is kind of confusing because you do still use like

const arr = new Uint16Array(20);

In a browser but in the node docs say to use Buffer.from(stufftomakebuffer) or Buffer.alloc(size) to make new buffers. Though using new Buffer should work for the for a while yet. Maybe both kinds of solutions should be shown because new Buffer() is used a lot?

see: https://nodejs.org/api/buffer.html#buffer_class_method_buffer_from_buffer

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant