js omit last string

JavaScript
"somestring0".slice(0, -1)
// "somestring"
Source

Also in JavaScript: