国产av日韩一区二区三区精品,成人性爱视频在线观看,国产,欧美,日韩,一区,www.成色av久久成人,2222eeee成人天堂

javascript - ???? ??? ???? ?? ? ??? ???? ????? ??? ?????
過(guò)去多啦不再A夢(mèng)
過(guò)去多啦不再A夢(mèng) 2017-05-19 10:35:27
0
3
625

?????? ?? ??? ??? ?? ?????
? ??? ?? ??????

???

??? ???? ??? ????? ????(Firefox ? Chrome)?? ?? ??? 3?? ??? ??? ?????.

???

???? ?? ???? ???? ???? ??? ?????.
?? console.log改為alert???? ?? ???? ??? ?????.
IE? ?? ????? ???? ???? ??? ??? ??? ????.
??? ???? ??? ???? ??? ?? ???? ?? ???? ??????? ??? ?????.

過(guò)去多啦不再A夢(mèng)
過(guò)去多啦不再A夢(mèng)

?? ??(3)
洪濤

?? ?? ??? ?????, ?? ??? ??? ??? ????:
/q/10...

?? ?? ??? ????? console.log?? ?? ?? ??? ????!

???? ??????, console.log? ??? ?? ???? API? ??? ??? ??? ? ???, ???? ??? ?? ??? ????. ??? ??? console.log? ???? console.log ??? ??? ?? ?? ??? ?? ???? console.log? ??? ???? console.log ??? ???? ????. ??? ??? ?? ?????.

?? ??: http://stackoverflow.com/ques...

Peter_Zhu

?????. ?? ??? ????? ??? ??? ?? ???? ???? ????. ??? ?? ?? ???? ?? ??? ?? ??? ?? ? ??? ????? ?????...
?? ??? ???? ??? ?? ??? ???? ????.
? ??? ??? ????. ???? ??? ?? ??? ?? ????? ??? ??? ??? ??????
Quan? ????? ??? ???? ???? ??? ????? ??? ???? ???.

My Chrome(Mac ???, ?? 57.0.2987)?? ??? ??? ??? ?? ??? ??? ?????.

  • ? ?? ??: ["red", "green", "blue"]

  • ? ?? ??: ["red", "green", "blue", "black"]

  • ? ?? ??: ["red", "green", "blue", "black"]

??? ??? ??, ??? ??? ???? ?? ?????.

???

??

???, ?? ???? ?????. child1 ????? ??? ???? child2? ??? ??? ??? ??????

  1. ????? ??? ? ????? __proto__ ??? ?? ???? .prototype ??? ?????. ?? ???? ??? ???(??)???.

  2. ???? ??? ???? ? ?? ???? ??? ?????. ?? ? ??? __proto__ ??? ?? ?? ???? ????? ???? ???? ??? ????. child1.colors? Father.prototype.colors? ????? ??? ?? ??? ?????. ?? ???? ?? ??? ???? ??? ????.

  3. child2.colors? Father.prototype.colors? ?? ??? ??? ????? child1? ??? ??? ?? ??? ? ????.

??? ?????

child1.colors? ?? ???? ?? ?????? ??? ????. (?? ???? ?? ?? ??? ?? ???? ????!)

???
滿天的星座

?? ?????:
??? ???? ? ? ??? ?? console.log? ?? ?? ?????. console.log的惰性求值問(wèn)題;
當(dāng)輸出的內(nèi)容為引用類(lèi)型中的ArrayObject時(shí),很有可能會(huì)出現(xiàn)問(wèn)題中的情況;

目前我看到的最佳解決方法是:
將輸出的內(nèi)容改為console.log(JSON.stringify(yourArray));
不會(huì)改變輸出的類(lèi)型和內(nèi)容,卻規(guī)避了console.log?? ???? Array ?? ? ??; ?? ?? >??, ??? ?? ??? ??? ???? ????.

???? ? ??? ???? ??? ????.

?? ???? console.log(JSON.stringify(yourArray))? ?????. ???? ??? ???? ???? ??? ??? ?????. console.log? ?? ?? ??;?? ??????? ????? ?? ??? ??????! ??