javascript 解构

const {a = [], b} = data;
如果data.a = null,
解构之后a是null,而不是[]

posted @ 2023-01-04 14:09  Running00  阅读(28)  评论(0)    收藏  举报