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
password = password.concat(combinedCaracters[this._random(0, length)]);
password += combinedCaracters[this._random(0, length)];
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
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
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.