ccanaria
6/19/2016 - 12:30 PM

ECMA 5 JavaScript Class Template

ECMA 5 JavaScript Class Template

var Shape = function (id, x, y) {
    this.id = id;
    this.move(x, y);
};
Shape.prototype.move = function (x, y) {
    this.x = x;
    this.y = y;
};