let str = "sunilkumar"; str = str.substring(0, str.length - 1); console.log(str); Run code snippetHide results