How To Remove Last Character From A String Using jQuery?

Table of Contents
Common problem faced by developers, how to remove last character from a string using jQuery, Here I am going to explain the solution with an example.



var str = '123-4';
alert(str.slice(0, -1));

Related posts