If you really meant '
'.split() (with no separator) and that‘s giving you a multi-element array (like in your first example), that‘s a bug. Which JS engine has this behavior?
String#split has always returned the input string if no separator is specified. This did not change in ES2018.
I think you meant:
'
'.split('');
…which returns:
['\uD83D', '\uDE80']
…but this hasn‘t changed in ES2018 either.
See https://mths.be/jsu for details.
-
-
-
sorry for wasting your time, my testing was incorrect.
- 7 more replies
New conversation -
-
-
whelp, thanks for that. Deleted my original tweet.
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.
JavaScript, HTML, CSS, HTTP, performance, security, Bash, Unicode, i18n, macOS.