对象的toString应为'[object Object]'而不是'object'

This commit is contained in:
Cyan 2023-04-14 15:56:04 +08:00
parent 87c33d391e
commit fa826823ec

View File

@ -93,7 +93,7 @@ console.log(a1.toString()); // "qianguyihao"
console.log(a2.toString()); // "29"
console.log(a3.toString()); // "true"
console.log(a4.toString()); // "1,2,3"
console.log(a5.toString()); // "object"
console.log(a5.toString()); // "[object Object]"
// 下面这两个,打印报错
console.log(a6.toString()); // 报错Uncaught TypeError: Cannot read properties of null