正确:
|
1 |
Object.prototype.hasOwnProperty.call(obj, 'key') |
报错:
|
1 2 |
Object.hasOwnProperty('key') // Do not access Object.prototype method 'hasOwnProperty' from target object |
|
1 |
Object.prototype.hasOwnProperty.call(obj, 'key') |
|
1 2 |
Object.hasOwnProperty('key') // Do not access Object.prototype method 'hasOwnProperty' from target object |
公众号
头条号