-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
addBook handler #29
Comments
mmm, was just lifted from https://nodejs.org/en/docs/guides/anatomy-of-an-http-transaction/#request-body |
maybe it's better because you only perform a concatenation once instead of adding to a string variable again and again. (?) |
we'll keep it 😄 |
But why is it better to add to an array variable over and over again but not a string (data.push()) |
But yeah I don't know what is better, your way is more explicit as my way does the conversion at the += automatically |
any thoughts @des-des |
Why do you create an empty array here and then push to it here and then have to unbuffer it all here.
Instead I'm pretty sure it works (I just tested it I think) if you do
and then you don't need to do the .toString() stuff, as I think when you do the += it auto converts or something
The text was updated successfully, but these errors were encountered: