We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4c06dfb commit b1b35cdCopy full SHA for b1b35cd
docs/symbol.md
@@ -846,7 +846,7 @@ String(obj) // 'str'
846
847
### Symbol.toStringTag
848
849
-对象的`Symbol.toStringTag`属性,返回一个字符串。在目标对象上面调用`Object.prototype.toString`方法时,如果`Symbol.toStringTag`属性存在,它的返回值会出现在`toString`方法返回的字符串之中,表示对象的类型。也就是说,这个属性可以用来定制`[object Object]`或`[object Array]`中`object`后面的那个字符串。
+对象的`Symbol.toStringTag`属性,用来设定一个字符串(设为其他类型的值无效,但不报错)。在目标对象上面调用`Object.prototype.toString()`方法时,如果`Symbol.toStringTag`属性存在,该属性设定的字符串会出现在`toString()`方法返回的字符串之中,表示对象的类型。也就是说,这个属性可以用来定制`[object Object]`或`[object Array]`中`object`后面的那个大写字符串。
850
851
```javascript
852
// 例一
0 commit comments