Destructuring Test

by nevkatz

HTML

<div id="root">

</div>

JavaScript

let obj = {
  x:0,
  y:1
}

function Player(level) {
  this.x = level.x;
  this.y = level.y;
  this.el = null;
  this.baseSpeed = 1;
  this.velocity = {
      x:0,
      y:0
  };
}