Answers for "javascript split string and remove whitespace"

1

javascript split and trim

var arr = str.split(",").map(item => item.trim());
Posted by: Guest on August-20-2020
0

split by whitespace javascript

var text = "hoi how     are          you";
var arr = text.split(/\s+/);
Posted by: Guest on May-24-2021

Code answers related to "javascript split string and remove whitespace"

Code answers related to "Javascript"

Browse Popular Code Answers by Language