Suggest improvements

ES6 Classes

ES6 Classes will feel very natural for those with experience writing Object-Oriented code in languages like Java and C#. Here’s a simple example:

class Beer {
  sell(location) {
  }
}

class SpottedCow extends Beer {
  constructor() {
    super();
    this.deliciousness = 50;
    this.locations = 'Wisconsin';
    this.name = 'Spotted Cow';
  }
  sell(location) {
    if(location !== 'Wisconsin') {
      throw new JailTimeError();
    }
  }
}

class MillerLite extends Beer {
  constructor() {
    super();
    this.deliciousness = 10;
    this.locations = 'anywhere';
    this.name = 'Miller Lite';
  }
  sell(location) {
    if(Location.hasSportsTeam(location)) {
      return true;
    }
    // Enh, we'll sell anywhere
    return true;
  }
}

let beer = new SpottedCow();

console.log('I am drinking a delicious ', beer.name, ' that is available ', beer.locations);

beer.sell();