In JavaScript it's better to use Array.from() to cast the string into an array instead of split, .from uses the string iterator which takes into account surrogate pairs .split does not.
cheers
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.
In JavaScript it's better to use
Array.from()
to cast the string into an array instead ofsplit
,.from
uses the string iterator which takes into account surrogate pairs.split
does not.cheers