Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function christmasTree(input) {
- let n = Number(input[0]);
- for (let i = 0; i <= n; i++) {
- console.log(`${' '.repeat(n - i)}${'*'.repeat(i)} | ${'*'.repeat(i)}${' '.repeat(n - i)}`);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement