title: String cutting with Javascript
body: <p>I have a string like  <code>"home/back/step"</code> new string must be like <code>"home/back"</code>. </p>
  
  <p>In other words, I have to remove the last word with <code>'/'</code>. Initial string always has a different length, but the format is the same <code>"word1/word2/word3/word4/word5...."</code></p>