How To Decease The End Grapheme Of A String Using Jquery?
You tin occupation the .slice() method, its cross browser compatible.
var id = "example1"; id.slice(-1); //Outputs: oneGetting the concluding grapheme is easy, every moment y'all tin process strings every moment an array:
var id = "example2"; var lastChar = id[id.length-1]; //Outputs: twoTo boot the bucket a department of a string, y'all tin occupation the substr function
var id = "example3"; id.substr(id.length-1); //Outputs: threeSumber http://developer-paradize.blogspot.com
Comments
Post a Comment