String manipulation

  1. How to delete the last character from a string?

string.slice(0, -1)

thanks