Boolean转换中, null、''、0、-0、undefined、NaN这6种为false,其余都为true,比如Boolean({}), Boolean([])
2021-04-15
最新回答 / _Jack_Han_
如果遇到函数也直接赋值给副本对象就可以,function定义的函数指针会指向其调用者,基本上不会产生this指针问题。(除非function定义的时候用到了bind方法)
2021-04-12
a instanceof b 要注意b的类型,否则会报
`Uncaught TypeError: Right-hand side of 'instanceof' is not an object`
`Uncaught TypeError: Right-hand side of 'instanceof' is not an object`
2021-03-31
apply 和call都没有返回值。所以result 永远是undefined。
这里改变this指向,是不是可以用apply比较好,这样还可以通过arguments传入参数
这里改变this指向,是不是可以用apply比较好,这样还可以通过arguments传入参数
2021-03-27