Problem in section 8 Interactive Javascript



<Below this line, add a link to the EXACT exercise that you are stuck at.>

<Below this line, in what way does your code behave incorrectly? Include ALL error messages.>

Oops, try again. It looks like you didn’t create the confirm dialog correctly (or you clicked ‘Cancel’ instead of ‘OK’). Check the examples in the instructions if you need help!

I have written the code exactly right and it won’t pass no matter what I do.


Replace this line with your code.
confirm(“I am a confirm box”);

<do not remove the three backticks above>


Hi @osgaldor,

Tested, your code is fine. It is just that the submission test is looking for user to click ‘OK’ after the confirm dialog pops up, anything other than that will throw this error:

Oops, try again. It looks like … (or you clicked ‘Cancel’ instead of ‘OK’).

Try clicking ‘OK’ when the confirm dialog box pops up this time, should be good to pass the exercise.

Hope it helps. Cheers :slight_smile:


No. I get this message regardless of which button I click.


@osgaldor, weird, I’m using Chrome browser. Clicking “Cancel” will lead to the error, whereas clicking “OK” it passes me. :thinking:

May I ask what browser you’re using? Maybe try changing browser?

I don’t have other suggestions left other than:

  • Changing different browser to see if it works (remember to click ‘OK’ when the box pops up)
  • Close/disable any extensions that might be interfering.
  • Change the confirm string? like:
    confirm("I feel awesome!");

Side note: this JavaScript track is no longer maintained by Codecademy (will be retired) and might be buggy (you might encounter more problems soon), it’s okay to do it as additional exercises, but for the latest one, try these two tracks:


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.