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