Skip to content

Instantly share code, notes, and snippets.

@parzibyte
Created April 24, 2023 15:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save parzibyte/fccff8b1c99fd892fd7197beb3c22849 to your computer and use it in GitHub Desktop.
Save parzibyte/fccff8b1c99fd892fd7197beb3c22849 to your computer and use it in GitHub Desktop.
tabla += obtenerLineaSeparadora() + "\n";
for (const producto of listaDeProductos) {
const lineas = tabularDatos(
[
{ contenido: producto.nombre, maximaLongitud: maximaLongitudNombre },
{ contenido: producto.cantidad.toString(), maximaLongitud: maximaLongitudCantidad },
{ contenido: producto.precio.toString(), maximaLongitud: maximaLongitudPrecio },
],
relleno,
separadorColumnas
);
for (const linea of lineas) {
tabla += linea + "\n";
}
tabla += obtenerLineaSeparadora() + "\n";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment