Added print() to code example and browser print prompt keeps opening

Soooooooo… I think I broke chrome?

I was trying to display my output from a variable by using

print()
now it just launches the browser printer prompt. If I hit cancel it just reopens. I can’t change or reset the code. The built in loop protection doesn’t help here because there is a delay between the print function running and me clicking cancel.

Any suggestions? Has anyone else run into this?

You didn’t break it. Use console.log(). JavaScript doesn’t use print() like that.

for your example, console.log(yourVariable); if you have lots of lines of code and you want to make sure you’re outputting the correct thing, use console.log('description here', yourVariable);

Thanks for replying.

The problem I am having is that

print()
is calling up the print prompt repeatedly so I can not edit the code.

1 Like

4 posts were split to a new topic: Problem using print() for a challenge solution