Neist
Re:Ask HN: I've been a programmer for 6 years, and I can't solve basic...
on Monday November 19, 2018 @03:42AM (#18484945)
Hi! Yeah, you're right! This was a 1-minute quick'n'dirty solution :-)
Re:Ask HN: I've been a programmer for 6 years, and I can't solve basic...
on Wednesday November 14, 2018 @05:01AM (#18448753)
They sure make it sound more complicated than it really is... I'm a self taught developer too, so I get where you're coming from :-)
In javascript I would solve it like so: "HELLO".replace(/./g, character => String.fromCharCode(character.charCodeAt() + 1))
This would result in "IFMMP".
Basically it's just a matter of shifting charcodes.