Javascript ottenere sottostringa prima di carattere
Esempi di codice
1
0
js ottenere la stringa prima di carattere
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 ";
0
0
js ottenere sottostringa prima di carattere
//split string into an array and grab the first item
var streetaddress = addy.split(',')[0];