function computeNbColAndLines(nbElements) {
  const nbColumns = Math.ceil(Math.sqrt(nbElements));
  const nbLines = Math.ceil(nbElements / nbColumns);
  return [nbColumns < 2 ? 2 : nbColumns, nbLines < 2 ? 2 : nbLines];
}
/**
 * Compute the appropriate number of columns and lines
 * for a window according to its number of children
 * @param {int} nbElements number of elements in a grid
 * @returns {[int, int]} the number of columns and lines
 */
Compute the appropriate number of columns and lines
for a window according to its number of children
@param {int} nbElements number of elements in a grid
@returns {[int, int]} the number of columns and lines
Compute the appropriate number of columns and lines for a window according to its number of children @param { int } nbElements number of elements in a grid @returns { [ int int ] } the number of columns and lines
function computeNbColAndLines(nbElements) {
  const nbColumns = Math.ceil(Math.sqrt(nbElements));
  const nbLines = Math.ceil(nbElements / nbColumns);
  return [nbColumns < 2 ? 2 : nbColumns, nbLines < 2 ? 2 : nbLines];
}
function computeNbColAndLines ( nbElements ) { const nbColumns = Math . ceil ( Math . sqrt ( nbElements ) ) ; const nbLines = Math . ceil ( nbElements / nbColumns ) ; return [ nbColumns < 2 ? 2 : nbColumns , nbLines < 2 ? 2 : nbLines ] ; }
Compute the appropriate number of columns and lines
 for a window according to its number of children
 @param {int} nbElements number of elements in a grid
 @returns {[int, int]} the number of columns and lines
Compute the appropriate number of columns and lines for a window according to its number of children @param { int } nbElements number of elements in a grid @returns { [ int int ] } the number of columns and lines