* My Ugly JS Christmas Tree
*/
var t = 1;
var s = 22;
for (var i = 1 ; i <= 20 ; i++) {
var spaces = "";
for (var z = 0 ; z < s ; z++) {
spaces = spaces + " ";
}
s = s - 1;
t = t + (i * t);
console.log(spaces + t + t);
}
for (var i = 0 ; i < 3 ; i++) {
console.log(" xxxxxxxxxx");
}
No comments:
Post a Comment