hello,

does anyone know how to split a string?

so far I have the following:

Code:
var string = "Hello my name is - Bob";

alert( sring.split('-', 2) );
however, I am not 100% sure if i am doing it correct.

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?