1、in 运算符
可看到无论是name,还是原形链上的toString,都能检测到返回true。
2、hasOwnProperty 方法
原型链上继承过来的属性无法通过hasOwnProperty检测到,返回false。
参考链接:https://www.cnblogs.com/snandy/archive/2011/03/04/1970162.html
可看到无论是name,还是原形链上的toString,都能检测到返回true。
原型链上继承过来的属性无法通过hasOwnProperty检测到,返回false。
参考链接:https://www.cnblogs.com/snandy/archive/2011/03/04/1970162.html
让时间为你证明