array of alphabet code example

Example 1: alphabet as array

'A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z',
        'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'

Example 2: alphabet array

char[] alphabet = {'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'};

Example 3: array alphabet

const alphabetArray = "abcdefghijklmnopqrstuvwxyz".split("");

Example 4: how to get the entire alphabet in code

C#

//Works with 'A' to 'Z' and '!' to '*'
for (char c = 'a'; c <= 'z'; c++) 
{
    print(c);
}

Tags:

Misc Example