this.shift = {x:this.x, y:this.y} works but not this.shift.x = this.x and this.shift.y = this.y?
<pre><code>this.x = (Math.random()*canvasWidth);
this.y = (Math.random()*canvasHeight);

(1) this.shift = {x: this.x, y: this.y};

(2) this.shift.x = this.x;
    this.shift.y = this.y;
</code></pre>

<p>Hi guys, I am playing with canvas and on my way to create a particle system.</p>

<p>The first (1) one will work but not the second (2) one why?
I am getting an error saying "Cannot set property 'x' of undefined" when debug using Chrome dev tools.</p>

<p>Any idea?</p>
