Skip to content
🧠 Master React Package Creation — Claim Your Spot

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