Discord
Login
Community
DARK THEME

using backspace to shorten strings

how do i take individuals letters of the end of a string because im making a login/signup menu and i want them to be able to type and use backspace to delete what they type

String.prototype.slice can be passed negative values for an index relative to the end of the string.

print("hello world".slice(0, -1)) // "hello worl"

Post a reply

Progress

Status

Preview
Cancel
Post
Validate your e-mail address to participate in the community