Ask HN: I've been a programmer for 6 years, and I can't solve basic CS problems 8 years ago
Hi! Yeah, you're right! This was a 1-minute quick'n'dirty solution :-)
HN user
Hi! Yeah, you're right! This was a 1-minute quick'n'dirty solution :-)
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.