[Community Puzzle] Decode the message

Hi,

I solved this puzzle and it did pass every test and validator, but this is the first time in my life where I write a code that solves a problem without understanding why it did work, because I tried to reverse the cipher using pen and paper. Can any one take a look on my solution for TypeScript and explain to me why it did work ?

Thanks

It’s an interesting situation: you’ve written a solution, but you don’t understand how it works. But only those who can solve this puzzle using TypeScript can help you, or you can send the solution to someone in a private message, like me.

Thanks, I sent the solution in a private message.