Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

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 ";
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #js #string #character
ADD COMMENT
Topic
Name
2+9 =