DEV Community

Discussion on: ROT13: awful answers only

Collapse
 
qm3ster profile image
Mihail Malo • Edited
Buffer.from('066085033032076066072032078069082032078074083072089044032079072071032086032089086088082032076066072046'.match(/.../g).map(x=>parseInt(x,10))).map(x=>x>64?x%26+97:x).toString('ascii')
Enter fullscreen mode Exit fullscreen mode

Allocating intermediate storage?
A regex?
Not specifying the radix to parseInt?
Not checking for punctuation other than which was used? ([-` and (-~) ranges)
Only working in node and not on the web due to using Buffer instead of TextDecoder?
And worst of all, completely misinterpreting the task, writing code that isn't especially slow?
Surely no worse could be done!

Collapse
 
mellen profile image
Matt Ellen

Any language or platform is permissible, so you're fine limiting to node :D