Skip to content

Instantly share code, notes, and snippets.

@caglarorhan
Created July 26, 2022 06:18
Show Gist options
  • Save caglarorhan/dfb7b4a2a3df2d86cd3a98c156f99fd4 to your computer and use it in GitHub Desktop.
Save caglarorhan/dfb7b4a2a3df2d86cd3a98c156f99fd4 to your computer and use it in GitHub Desktop.
XmassTree Drawing
for(let i=1, x=0; i<40;i=i+2, x++){
let empty = " ".repeat(40-(x));
let rand = ()=>Math.floor(Math.random()*i);
let star = "*".repeat(i).split('');
star[rand()]="❆";
// star[rand()]="🎁";
// star[rand()]="πŸ””";
console.log(empty,star.join(''));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment