parse+stringify確實會在一些處理特殊值的時候有問題,但也是用的最多的,在能夠保證數(shù)據(jù)安全性的前提下還是很好用的
2021-06-01
Boolean轉(zhuǎn)換中, null、''、0、-0、undefined、NaN這6種為false,其余都為true,比如Boolean({}), Boolean([])
2021-04-15
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傳入?yún)?shù)
這里改變this指向,是不是可以用apply比較好,這樣還可以通過arguments傳入?yún)?shù)
2021-03-27