get string before character nodejs code example
Example: js get string before character
var str = "JavaScript is the programming language of the Web.";
// this will return string before the word programming
var result = str.split('programming')[0];
// result : "JavaScript is the ";