www.fromthevalley.com.au

Remove Last Character off String

Let's say we want to move the trailing , off the line.

To do this we would need to do:

var myStr = "One, Two, Three, Four,"
var strLen = myStr.length;
myStr = myStr.slice(0,strLen-1);
alert (myStr);

or

myStr = myStr.slice(0,-1);

 

HOME |  AJAX |  APACHE |  Bizphone |  CSS |  DNS |  General |  Graphics |  HTML |  Hardware |  Javascript |  Linux |  MAC |  MS SQL |  Mail |  Microsoft |  OFFICE 365 |  Perl |  Postgres |  SEO |  Social Media |  VMware |  Windows 10