Skip to content

Instantly share code, notes, and snippets.

@bendc
Created January 30, 2015 21:38
Show Gist options
  • Select an option

  • Save bendc/1e6af8f2d8027f2965da to your computer and use it in GitHub Desktop.

Select an option

Save bendc/1e6af8f2d8027f2965da to your computer and use it in GitHub Desktop.
Array of uppercase and lowercase letters
const letters = (() => {
const caps = [...Array(26)].map((val, i) => String.fromCharCode(i + 65));
return caps.concat(caps.map(letter => letter.toLowerCase()));
})();
@juanpabloaj
Copy link

Go

	letters := []string{} // or []rune{}
	for c := 'A'; c <= 'Z'; c++ {
		letters = append(letters, string(c))
	}
	fmt.Println(letters) // [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]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment