Preferred way to check object property is `null` or `undefined`

This question already has an answer here:

  • Detecting an undefined object property 40 answers

  • I reckon you'd use obj.hasOwnProperty(prop)

    https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Object/hasOwnProperty

    链接地址: http://www.djcxy.com/p/22650.html

    上一篇: 如何将git标记删除并将新文件作为文件移动?

    下一篇: 检查对象属性的首选方法是`null`或`undefined`