Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function Car(color, speed) {
- this.color = color;
- this.speed = speed;
- this.info = function () {
- return color + "car travelling at " + speed + " mph.";
- }
- }
- var redCar = new Car('red', 55);
- var yellowCar = new Car('yellow', 60);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement