Idk why I didn’t start the loop from 1… habit maybe ? But very similar , just loop where i=0. Ended up creating a element each time instead of logging it out though
@SAMUEL__DEV218 сағат бұрын
Merry Christmas From Nigeria 🇳🇬 big fan ❤❤
@joel-rg8xm10 сағат бұрын
I don't know much about algorithms, didn't go to school (shame on me), I just counted mentally with my fingers, and came up with this approach before watching the solution: let c=n for (let i=1; i
@DavePerth17 сағат бұрын
Nice work! I initially was thinking to output it using HTML and centering each layer with CSS!
@bhanu260319 сағат бұрын
Merry Christmas bro 🎉❤
@AI.magicalstream18 сағат бұрын
Very nice & merry Christmas 🎄
@NetNinja16 сағат бұрын
Merry Christmas! :)
@jessiejames764218 сағат бұрын
Merry Christmas from France
@NetNinja15 сағат бұрын
Merry Christmas, big love to France!
@Dexter101x14 сағат бұрын
Merry Christmas. I didn't have enough time to try solve this
@NetNinja10 сағат бұрын
No problem Dexter, happy holidays!
@ramprasathrp19 сағат бұрын
First comment from🇮🇳
@fezzylink118 сағат бұрын
From Nigeria 🇳🇬
@kadercherif23216 сағат бұрын
Hello here is how I solved : void main() { int espace = 1; for (var i = 0; i < 30; i += 2) { espace++; final index = i + 1; final feuilleSapin = "*" * index; final sapin = feuilleSapin.replaceFirst("", " " * (30 - espace)); print(sapin); } print("*".replaceFirst("", " " * (30-2)); print("*".replaceFirst("", " " * (30-2)); }
@joong-sunwee614716 сағат бұрын
const trees = n => { Array.from({ length: n }).forEach((_, i) => { let empty = ' '.repeat(n - (i + 1)); let str = '*'.repeat(2 * (i + 1) - 1); const result = empty + str; console.log(result); }); }; trees(7); Happy Cristmas...