hello,
does anyone know how to split a string?
so far I have the following:
however, I am not 100% sure if i am doing it correct.Code:var string = "Hello my name is - Bob"; alert( sring.split('-', 2) );
I am trying to get the bob part of the string only.
but it displays Hello my name is , bob
Does anyone know what I am doing wrong?




Reply With Quote