Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

split text javascript

const splitText = (string) => {
  const newText = string
    .split(/((?:w+ ){1})/g)
    .filter(Boolean)
    .join("
");
  return newText
};
console.log(splitText("Hello, world"));
//Hello,
//world
Source by www.textbotonline.com #
 
PREVIOUS NEXT
Tagged: #split #text #javascript
ADD COMMENT
Topic
Name
8+7 =