Ohh, I also tested the performance of your code, it scored second amongst the rest of the cases. So get/set did not affect significantly, so no big sacrifice there!
Accessibility First DevRel. I focus on ensuring content created, events held and company assets are as accessible as possible, for as many people as possible.
I though that too, but I did some benchmarks, and found out concat to perform a bit faster than +=. It was not the most extensive benchmark, and it might vary from browser to browser and such... but would be interesting to know though
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Ohh, I also tested the performance of your code, it scored second amongst the rest of the cases. So get/set did not affect significantly, so no big sacrifice there!
Just wondering, is it faster to do
vs just
I would imagine as
concat
is not performant it would be faster.Only glanced at it though so I might have missed a good reason for
concat
.I though that too, but I did some benchmarks, and found out concat to perform a bit faster than
+=
. It was not the most extensive benchmark, and it might vary from browser to browser and such... but would be interesting to know though