0

I know that in Python there is method to get alphabet. Is it exist in js?

As i said? i just want to get all english alphbet. That is all

VLAZ
  • 26,331
  • 9
  • 49
  • 67

1 Answers1

0

You could use Array.from() with String.fromCharCode() to generate the letters:

const alphabet = Array.from({ length: 26}, (v, n) => String.fromCharCode(n + 97));
console.log(alphabet)
.as-console-wrapper { max-height: 100% !important; }
Terry Lennox
  • 29,471
  • 5
  • 28
  • 40