var
str =
'Dear Raj!'
;
newStr = str.substring(0, str.length-1);
//alert(newStr);
but the simplest is
str.slice(0,-1)
No comments:
Post a Comment