Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

string remove last two characters javascript

let string = 'foo_bar';
string = string.slice(-4, 0); // Slice off last four characters here
console.log(string);
 Run code snippetHide results
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #string #remove #characters #javascript
ADD COMMENT
Topic
Name
6+1 =