If I'm creating an anonymous function with the new Function() constructor, how would I grab the console logs from inside of it?
For example:
value = "console.log('test');";
response = new Function(value)();
response is undefined because there is not return statement in this function. Is there any way for me to find stream the console.log output from this function?
Thank you!