【js】对象属性名为对象时
摘要:
demo var a = {}; var b = {key: 'b'}; var c = {key: 'c'}; var d = [3,5,6]; a[b] = 123; a[c] = 345; a[d] = 333; console.log(a[b]); //345 console.log(a[c 阅读全文
posted @ 2022-08-02 16:26 smile轉角 阅读(134) 评论(0) 推荐(0) 编辑