Keep only first n characters in a string?

前端 未结 7 1753
逝去的感伤
逝去的感伤 2020-11-29 16:37

Is there a way in JavaScript to remove the end of a string?

I need to only keep the first 8 characters of a string and remove the rest.

7条回答
提交回复
热议问题