Personally I find the Ruby easier to read. Just follow the functions left to right, and the method names are more literate (chars() vs split('') for instance). I’m also not sure at first what slicing on an array with a negative start index will do, whereas I’m sure each_cons does just what it purports to do.
Fair enough. In js slicing with a negative index would grab from the end of the array, but if the end index is positive it'll return an empty string so it's safe in this case
I think the tradeoff is how much of the API you need to memorize. In JS if you know .filter, .map, and .reduce you're good for 95% of use-cases (technically .reduce can be used to implement every other method, but it can get messy). I also work with Ruby at my job and I constantly find myself wondering if this is the best tool for the situation
This was my first job using Ruby so it's definitely become less of a problem over time and I think if it's your MAIN language then having a fat API like that is fine. But I do think there's a trade-off and it can introduce more spaces for bad practices