How do I remove the last 4 characters in a string?
'abcdefghijklmnopqrstuvwxyz' to 'abcdefghijklmnopqrstuv'
Answer: slice(0,-4)
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.