[Solved] Split a string into 2 parts using js [closed]


Well the question is kind of un-specific with it’s requirements, but to get the results asked in the question I did this.

var word = "less than some value";
var split = word.split(" ");
var a = split[0] + " " + split[1];
var b = split[2] + " " + split[3];
console.log(a); //logged "less than"
console.log(b); //logged "some value"

Not exactly sure if this is what you wanted tho.

solved Split a string into 2 parts using js [closed]