patterns-run

patterns-run

Collection of snippets to render logical patterns

arrow-top-left

Back to gallery
const size = 5;

for (let i = 0; i < size; i++) {
  for (let j = 0; j < size; j++) {
    const line = i === j;
    const head = i < size - j;

    print(line || head ? "* " : "  ");
  }
  newline();
}