Skip to content

Instantly share code, notes, and snippets.

@raivieiraadriano92
Created January 25, 2019 19:54
Show Gist options
  • Save raivieiraadriano92/45a8e04625427c5d97e2a097e7aa25be to your computer and use it in GitHub Desktop.
Save raivieiraadriano92/45a8e04625427c5d97e2a097e7aa25be to your computer and use it in GitHub Desktop.
/**
.
...
.....
.......
.........
*/
let node = 1;
let initMaxWidth = 5;
while (node <= 5) {
let points = node;
let maxWidth = initMaxWidth;
while (points <= 9) {
const line = ''.padStart(points, '.').padStart(maxWidth, ' ');
console.log(line);
points += 2;
maxWidth += 1;
}
node += 2;
initMaxWidth += 1;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment