开发者问题收集
var a = {}var b = {}try{a.x.y = b.e = 1 // Uncaught TypeError: Cannot set property 'y' of undefined} catch(err) {console.error(err);}console.log(b.e) // 1var a = {}var b = {}try {a.x.y.z = b.e = 1 //
我看到了这段代码:this.vertical = vertical !== undefined ? !!vertical : this.vertical;它似乎使用!!作为运算符,我不认识它。它起什么作用?