我正在寻找类似Map的默认值的东西。
m = new Map(); //m.setDefVal([]); -- how to write this line??? console.log(m[whatever]);
现在结果是未定义,但我想获取空数组[]。
javascript arrays dictionary default-value
arrays ×1
default-value ×1
dictionary ×1
javascript ×1