isRectangular.js 213 B

123456789101112
  1. 'use strict';
  2. /**
  3. *
  4. * @param {string[][]} areas
  5. * @returns {boolean}
  6. */
  7. function isRectangular(areas) {
  8. return areas.every((row, _i, arr) => row.length === arr[0].length);
  9. }
  10. module.exports = isRectangular;