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