Three Ways To Change A String Into An Array in JavaScript!

preview_player
Показать описание
#javascript #coding #tutorial #shorts

Рекомендации по теме
Комментарии
Автор

Note that not all methods are created equal. Both [...x] and Array.from(x) will split the string "😄😄" into ["😄", "😄"] whereas x.split("") will return ["\ud83d", "\ude04", "\ud83d", "\ude04"]. See the MDN String.prototype.split documentation if you want to know why.

limintr
Автор

Intl.Segmenter is what you really need

iamInnoel
visit shbcf.ru