Why do I get an error when using substring for the same array?
滿天的星座2017-07-05 10:50:09
Thesubstring() 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
怪我咯2017-07-05 10:50:09
substring is used to operate strings. It is recommended to use slice instead.
淡淡烟草味2017-07-05 10:50:09
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