input string
number of characters to remove (default: 1)
updated string
var out = removeLast( 'last man standing' );
// returns 'last man standin'
var out = removeLast( 'presidential election' );
// returns 'presidential electio'
var out = removeLast( 'javaScript' );
// returns 'javaScrip'
var out = removeLast( 'Hidden Treasures' );
// returns 'Hidden Treasure'
var out = removeLast( 'leader', 2 );
// returns 'lead'
Removes the last character(s) of a string.