如果b = [1,2,3,4]和c = [... b],为什么b不等于c?

问题描述 投票:1回答:2

标题几乎说明了一切,但在这里写出:

b = [1, 2, 3, 4];
c = [...b];

b === c; //false

为什么?

javascript arrays spread-syntax
2个回答
© www.soinside.com 2019 - 2024. All rights reserved.