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.
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?
-
-
sorry for wasting your time, my testing was incorrect.
-
Ah, no worries. Thanks for double-checking!
- 6 more replies
New conversation -
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.