But no, it's most likely not going to be performant (even like this), because it involves indexing into every character instead of handing the underlying native string to the native method.
Worse yet, .split('') and such don't play well with composite Unicode graphemes.
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.
Might be more performant since you have to loop the array anyway
Woo, I love this solution! Nice use to the falsy value to check the first character (cause 0 is false). Thanks for sharing ๐ฏ
You can just map on the string :v
But no, it's most likely not going to be performant (even like this), because it involves indexing into every character instead of handing the underlying native string to the native method.
Worse yet,
.split('')
and such don't play well with composite Unicode graphemes.