1var str = "JavaScript is the programming language of the Web.";
2
3// this will return string before the word programming
4var result = str.split('programming')[0];
5// result : "JavaScript is the ";
1//split string into an array and grab the first item
2
3var streetaddress = addy.split(',')[0];
4