Привет, я не специалист по JS, но что-то вроде этого должно работать:
var Enemy = function(x, y) {
// Variables applied to each of our instances go here,
// we've provided one for you to get started
// The image/sprite for our enemies, this uses
// a helper we've provided to easily load images
this.sprite = 'images/enemy-bug.png';
this.x = x;
this.y = y;
this.speed = Math.floor(Math.random() * MaxSpeedValue) + MinSpeedValue;
}