How do I remove the last 4 characters in a string?
'abcdefghijklmnopqrstuvwxyz' to 'abcdefghijklmnopqrstuv'
Answer: slice(0,-4)
yourString = yourString.substring( 0, yourString.length - 4 ) would also work, if you need more practice typing and want your cpu to work harder.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With