patterns-run

patterns-run

Collection of snippets to render logical patterns

triangle-d

Back to gallery
const size = 5;

for (let i = 0; i < size; i++) {
  for (let j = 0; j < size; j++) {
    print(j >= size - i - 1 ? "* " : "  ");
  }
  newline();
}