*
*#
*#*
*#*#
*#*#*
I tried this but it' not working
For(let i = 1; i <= 5: i++) {
for (let j = 1; j <= i; j++) {
if (j % 2 == 0) {
console.log("#".repeat(j)
}
else {
console.log("i".repeat(i)
}
}
}
Aucun commentaire:
Enregistrer un commentaire