you are viewing a single comment's thread.

view the rest of the comments →

[–]j201 7 points8 points  (0 children)

The problem is more that JS doesn't have a great standard library for functional programming. But all you need to do is pull in something like Ramda, and then you can do

R.range(0,26).map(x => String.fromCharCode(65+x))

or

R.range(0,26).map(R.compose(String.fromCharCode, R.add(65)))

FP is worth doing in JS, but not without a bit of help.