remove last 5 characeters froms tring js code example Example: js omit last string "somestring0".slice(0, -1) // "somestring"