also2.js 360 B

123456789101112131415
  1. /** @class */
  2. function BowlingAlley() {
  3. this._lanes = 0;
  4. }
  5. /**
  6. * Add a lane to the bowling alley.
  7. * @also
  8. * Add the specified number of lanes to the bowling alley.
  9. * @param {number} [lanes=1] - The number of lanes to add.
  10. */
  11. BowlingAlley.prototype.addLanes = function addLanes(lanes) {
  12. this._lanes += (typeof lanes === undefined) ? 1 : lanes;
  13. };