Why doesn't console.log() take a snapshot of the passed variables?

后端 未结 3 1319
长发绾君心
长发绾君心 2020-12-31 01:59

I\'ve ran into some really weird behavior with javascript today. I think I got it somehow figured out now, but I\'d like to know if what I think is going on is really happen

3条回答
  •  暖寄归人
    2020-12-31 02:33

    I've also seen this behavior and it sure looks like a reference is posted. To get around this I used the clone() method in jQuery on the things I wanted to log.

提交回复
热议问题