• Theory
  • Theory

Fifth program: Beginner decryptor

For the fifth hour in a row the cat has been hanging on the curtains by the window. His paws were going numb, but he did not intend to surrender. Today, on Friday, he came to the marketing department before dawn, when there was nobody there, and set an ambush.

Something began to happen: people stood up, moved their chairs closer to the TV, and turned the game console on. The tournament began. Muffin knew what was going on right away. He pulled his claws in with relief, fluffed up his tail and flopped down on the sill…

And the following week, the dips in traffic disappeared. Thank you, data analysis!

Your excellent program helped Muffin find out about Friday e-sports tournaments in the marketing department. When they were over, the video blog’s popularity grew steadily, and Muffin started respecting you for your programming skills. And he invited you to take part in his new dream project.

Muffin got on the hype train and decided to get his own blockchain start-up going. Moscow was not built overnight, so Muffin began with small steps: encryption algorithms. Here is the technical assignment written by his own paw:

Meow! I learned how to encrypt and I need a decryption program.

There is an array symbols where the alphabet (letters and other symbols) is stored.

There is an array encodedMessage where an encrypted message is stored. Each element of this array is a character index from the array symbols.

The decryption program must translate elements from the encoded message array (encodedMessage) into characters from the alphabet array (symbols) and join them into a decoded string. Store this string in the variable decodedMessage.

When everything is ready, call the Boss by clicking Hey boss, here’s your program!.

  • index.html
HTML
HTML

You’ve gone to a different page

Click inside the mini-browser to shift the focus onto this window.

100%
Granny Muffin

Easy there, pal!

To access the Arrays challenges in the JavaScript programming, you need to sign up first.