Skip to content
Advertisement

Can’t manage to hide window using if on javascript

First of all a little background so that you guys don´t respond so harshly, I´ve been learning code for the past month and a half. I´ve been having trouble hiding a window that shows up if your browser language is not in English. I know there are other ways to go around it but I would like to know why it isn´t working, I just don´t want to give up on it and try to understand it. I want the window to disappear when I press the no button. HERE IS AN IMAGE OF THE WINDOW https://imgur.com/gallery/iTEX0I0 Here is the code:

JavaScript
JavaScript

Advertisement

Answer

I think there’s a typo on line 6, change buttonn to button, see if that works.
I have added the snippet that works fine, according to your need.

JavaScript
JavaScript
User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement