A lightweight Christmas tree generator for JavaScript
- clone or download repository
- open christmasTree.js in a modern text editor such as VSCode
- turn head sideways
- experience the joy of the season
function ChristmasTreeFarm(numberTrees) {
farm = '';
for(i=0; i < numberTrees; i++) {
farm += (ChristmasTree.toString())
}
return farm;
}
console.log(ChristmasTreeFarm(1000));
- does not work in IE9
- minification may impact functionality