Why do I get an error when using substring for the same array?
业精于勤,荒于嬉;行成于思,毁于随。
The substring() method is used to extract characters between two specified subscripts in a string. Syntax: stringObject.substring(start,stop)
substring() method is used to extract characters between two specified subscripts in a string.
Syntax: stringObject.substring(start,stop)
Cannot be used directly on arrays. Please refer to JavaScript substring() method
substring, as the name suggests, is a function of string.
substring is used to operate strings. It is recommended to use slice instead.
splice is the value returned by deletion, oppArr has been changed and becomes empty; splice(0) is to clear the array; slice(start, end) is to intercept the array and will not change the original array; substring is to intercept the string Method
Cannot be used directly on arrays. Please refer to JavaScript substring() method
substring, as the name suggests, is a function of string.
substring is used to operate strings. It is recommended to use slice instead.
splice is the value returned by deletion, oppArr has been changed and becomes empty;
splice(0) is to clear the array; slice(start, end) is to intercept the array and will not change the original array;
substring is to intercept the string Method