I have this code in an html page (JavaScript):
<script>
var cox,d = 0;
Console.Log(cox,d);
</script>
Now I encrypted [var cox,d = 0; Console.Log(cox,d);]
manually with base64 encode and the result is this: IHZhciBjb3gsZCA9IDA7DQogQ29uc29sZS5Mb2coY294LGQpOw==
I want that this encoded string (the code) could be executed by another JavaScript function in the same page... example:
<script>
var encoded = "IHZhciBjb3gsZCA9IDA7DQogQ29uc29sZS5Mb2coY294LGQpOw==";
var decodedString = atob(encoded);
/* Problem is here */
</script>
I want to execute the JavaScript code (encoded above) in /* Problem is here */
'.
How can I do?