Powershell loop with numbers to alphabet

Question:

I need help with the following:
Create a for loop based on the conditions that the index is initialized to 0, $test is less than 26, and the index is incremented by 1
For each iteration, print the current letter of the alphabet. Start at the letter A. Thus, for each iteration, a single letter is printed on a separate line.
I am not able to increment the char each time the loop runs

I have tried multiple attempts with trying to increment the char 65 through 90 with no success.
Is there an easier way to increment the alphabet to show a letter for each loop that is ran?

Answer:

You can sum your loop index with 65. So, it’ll be: 0 + 65 = A, 1 + 65 = B …

Source:

Powershell loop with numbers to alphabet by licensed under CC BY-SA | With most appropriate answer!

Leave a Reply