why the latest values are overriding into array of object in javascript?
问题 <html> <head> <style type="text/css"> #mycanvas{ width:500px; height:450px; border:2px solid green; font-size:30px; } </style> <script> window.onload = function (){ vcan = {}; vcan.main = {} vcan.main.repNode = []; vcan.main.currentTransform = {'id':0, 'name':'myobj'} document.getElementById("mycanvas").addEventListener('mousemove', mymousemove); function mymousemove(){ var currAdTime = new Date().getTime(); console.log(currAdTime); var myObj = extend(vcan.main.currentTransform , {mdTime