Using a FOR
loop to add and output numbers is easy. But how do you add and output additional characters?
For example the following simple program outputs the numbers 1 through 7 to the console
.
for (var count = 0; count < 7; count++) {
console.log(count + 1);
}
But what if instead of numbers I needed to add additional characters or symbols each loop? For example how would someone output characters to the console
like this?
A
AA
AAA
AAAA
AAAAA
AAAAAA
AAAAAAA
I'm sure the answer is straightforward but I don't know how to approach this type of problem.