CodePudding user response:
Slice () returns a new array,When comparing two array is the address of the reference according to the array comparison,
Although the two elements in the array are exactly the same, but two arrays refer to address different is not equal,