• Theory
  • Theory

Fifth program: Beginner decryptor

For the fifth hour in a row the cat has been hanging on the curtains from the side of the window. His paws started to numb, but he did not intend to surrender. Today, on Friday, he came to the department of market experts 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, puffed his tail and flopped down on the sill…

And next 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 growth of the video blog popularity rose up and continued to do so like clockwork, and Muffin started respecting you as a strong programmer. 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 symbol index from the array symbols.

The decryption program must translate elements from the array with encryption (encodedMessage) into characters from the alphabet array (symbols) and glue them into a decoded string. Write this line into 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 and subscribe first.