Split a string using jquery

Let string be:
var str=”hello/how/are/u?”;

Split string by “/”.

var res = str.split(“/”);

//getting complete result.
alert(res);
// getting each value in the array
alert(res[0]);
alert(res[1]);