Cipher v2

The decryption function.

Skills: InputOutputVariablesIf StatementsLoopsArrays
0.5%

Brief

Add a button that decrypts a string of pipe-separated character codes back into its original plaintext.

The user should be able to input any series of pipe-separated character codes, click a button, and be given the decrypted output, e.g.

116|104|97|116|39|115|32|110|111|116|32|116|104|101|32|109|101|115|115|97|103|101|

decrypts to...

this is a secret message

Here's some references to help you write this function:

You can use the Svelte example below if you need help to get started. It contains all of the code for this program. If you can, try to complete the program without looking at it.


Sandbox

Feel free to play around with the example below to see how the web page reacts to your code changes in a consequence-free environment. You won't break or overwrite anything so go for gold.