for (let i = "#"; i.length < 10; i+="#"){
console.log(i);
}
for (let y = "*********"; y.length >0; y-="*"){
console.log(y);
}
The first part is Eloquent JavaScript exercise. I wanted to make another loop starts from end of the first loop. The first loops ends with "########" and my other loop will start same amount of "#" but with "" and it should decrease until it has one "". So it would be reverse triangle like this:
#
##
**
*
I wanted to make it as simple as first loop. My question is can we make it like the first loop? And why "-=" is not working?