Created
August 2, 2022 11:45
-
-
Save some-say/f3fdf4b9fb34a76382da5a29750d41d7 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Task no. 1: | |
| // use array.reduce to change a two-dimensional array to a key-value object (keys must not be overwritten) | |
| const array = [ | |
| ['name', 'MORWBYTfaG'], | |
| ['name', 'F05hDUA88t'], | |
| ['name', 'YYgmrag4VT'], | |
| ['name', 'iMIqSv8sWR'], | |
| ['name', 'sh1N28ncvu'], | |
| ['name', 'xUfKizHKMX'], | |
| ['name', 'YXrF1D4BVy'], | |
| ['name', 'zcDLa5lfxj'], | |
| ['name', 'JyNplcYx4G'], | |
| ['name', 'jj79iQSLXS'] | |
| ] | |
| // Task no. 2: | |
| // decode strings in array | |
| const array2 = ['\x63\x61\x74\x63\x68', '\x73\x63\x72\x65\x65\x6e', '\x58\x50\x61\x74\x68\x52\x65\x73\x75\x6c\x74', '\x74\x69\x6d\x69\x6e\x67', '\x67\x65\x74\x45\x6c\x65\x6d\x65\x6e\x74\x73\x42\x79\x54\x61\x67\x4e\x61\x6d\x65', '\x4c\x69\x62\x65\x72\x61\x74\x69\x6f\x6e\x20\x4d\x6f\x6e\x6f', '\x63\x6c\x69\x70\x62\x6f\x61\x72\x64\x2d\x72\x65\x61\x64', '\x61\x74\x74\x61\x63\x68\x45\x76\x65\x6e\x74'] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment