I'm uncertain about the wording to use in searching for a solution to this query. Here is the code snippet:
this.snake = [{x: 0, y: 0}];
var curhead = this.snake[0];
Is curhead
holding a duplicate of the object at snake[0]
or is it directly referencing it?