Console Problems

Console Problems
0.0 0

#1

Hi, I am having some problems seeing my output in the browser console. I am using Google Chrome. Every time I try to use console.log() the browser console has an error message saying “Blocked script execution in ‘<URL>’ because the document’s frame is sandboxed and the ‘allow-scripts’ permission is not set.” Is there any way to fix this so that I can see the output. Thank you.


#2

Are you using Codepen, JSFiddle?


#3

I am doing the basic algorithm scripting javascript challenges on Free Code Camp.


#4

If you want to see what is being returned by the function, then put the console.log statement inside the function like below. That way you will know what the final value of str is before it gets returned.

function reverseString(str) {
  console.log(str)
  return str;
}

#5

Thanks, that worked. Why can I not use console.log and call the function to see the value?


#6

In this particular case, I believe it has something to do with the way the test is ran behind the scenes. Normally, you can use console.log with the tests.


#7

Ok, thanks so much for your help!


#8

Be prepare to run VS code. better handling. and your solution didnt dissapear.


es lint typescript