function test(){ return (+{}+[])[1]; //返回a }
有如上一段js代码,想知道的是为什么返回值是"a"?
"a"
闭关修行中......
+{}=NaN,NaN+[]="NaN","NaN"[1]=a
+{}=NaN,NaN+[]="NaN","NaN"[1]=a