Alphabet generation in JS: are there any constants?

In Python, there is constant for alphabet in string module:

string.ascii_lowercase//'abcdefghijklmnopqrstuvwxyz'

I can’t find anything like that for JS.

I guess I found some mapping technique:

const alphabet = [...Array(26)].map((v,i)=>v=String.fromCharCode(i+97));

But it’s not constant obviously. So there is no such thing in JavaScript?

you can use string method charCodeAt(index) for Unicode representation of that character

1 Like

Well, your advice helped me solve Caesars Cipher cert project pretty fast)

Wait, how did you implement that? I mean charCodeAt()

Did you solve this challenge? I can post solution, but I don’t wanna give a spoiler.

I solved it a while ago but I manually wrote out the alphabet lol. You can direct message me

I hope you received it. Nothing really fancy there)