Draft
Decrypt me: function parser
Description:
During this kata, you will take on the role of a spy-decryptor.
Your commander has sent you on a dangerous mission to locate an envelope containing crucial information about your commander. Fortunately, an anonymous assistant from your enemy’s side has decided to help you and has sent you the envelope. However, the information inside is encrypted as an expression.
Your task is to decrypt the information inside.
Your are given a function as a string, for example:
'() => 1+2+3*4'
and your task is to provide the function with the same content
As you need to decrypt it as soon as possible, you can not recall how to use the follwoing methods (oh, what a poor memory):
- require
- eval
- Function
- and some regexp methods
Input
string as a function
Output
function itself (do not call it)
Restricted
Puzzles
Similar Kata:
Stats:
Created | Nov 10, 2024 |
Warriors Trained | 13 |
Total Skips | 0 |
Total Code Submissions | 25 |
Total Times Completed | 6 |
JavaScript Completions | 6 |
Total Stars | 1 |
% of votes with a positive feedback rating | 33% of 3 |
Total "Very Satisfied" Votes | 0 |
Total "Somewhat Satisfied" Votes | 2 |
Total "Not Satisfied" Votes | 1 |
Total Rank Assessments | 2 |
Average Assessed Rank | 6 kyu |
Highest Assessed Rank | 6 kyu |
Lowest Assessed Rank | 6 kyu |