Write a function generateAtoZ() that returns an array of 26 strings representing the letters A through Z in order.
Examples
Input: none
Output: ["A", "B", "C", ..., "Z"]
Constraints
- Use a loop-based approach (e.g., for or while).
- Output must be an array of exactly 26 single-character uppercase strings.
- No input arguments are required.
Function Signature
function generateAtoZ() {
// Your code here
}
Test Cases
- Returns an array
- Length is 26
- First element is "A", last element is "Z"
- All elements are single uppercase letters
-Letters are strictly in ascending order without duplicates