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

Edit It: Split the given string at whitespaces and limit the returned array to one item only

Home>split() JavaScript String Method>Edit It: Split the given string at whitespaces and limit the returned array to one item only

Edit It: Split the given string at whitespaces and limit the returned array to one item only

This code shows how to split a string at whitespaces and limit the returned array to one item only.

See it on StackBlitz