programming-examples/js/String/Split a string and convert it into an array of.js
2019-11-15 12:59:38 +01:00

4 lines
144 B
JavaScript

string_to_array = function (str) {
return str.trim().split(" ");
};
console.log(string_to_array("Robin Singh"));