Skip to content
🛠️ Learn. Build. Ship. Save. Master NPM Publishing at a Discount

Edit It: Split a given string containing a surrogate

Home>split() JavaScript String Method>Edit It: Split a given string containing a surrogate

Edit It: Split a given string containing a surrogate

This code shows how using an empty string as the split() method's argument will destroy surrogate pairs and cause bugs in your application.

See it on StackBlitz