Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial![](https://ecs-static.teamtreehouse.com/assets/views/marketing/shared/community-banner-white-47072046c51352fe6a69f5e691ff5700b28bb11d45197d7bdf066d9ea3f72d0c.webp)
![Spencer Renfro](https://secure.gravatar.com/avatar/290de00adbb10a59657d8efec59e6b36?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
Spencer Renfro
Courses Plus Student 11,133 PointsWhy am I getting a violation error inside the console?
I get this violation message to appear when I run my code.
jquery.js:3 [Violation] Added synchronous DOM mutation listener to a 'DOMNodeInserted' event. Consider using MutationObserver to make the page more responsive.
Here is my code: const answer = prompt('Which planet is closest to the sun?');
if (answer.toUpperCase() === 'MERCURY') { console.log("That's correct!") } else { console.log("Sorry, that's not correct.")
}
4 Answers
![Steven Parker](https://uploads.teamtreehouse.com/production/profile-photos/969492/micro_tool_chess_set_2.jpg)
Steven Parker
230,688 PointsOdd, I can't replicate the problem and this error message seems to come from "jQuery"; but that's not used in this code (and I don't think it's used anywhere in this entire course). If you're using a workspace, make a snapshot of your workspace and post the link to it here to allow a more accurate analysis.
if you're doing this in a different environment, see if you accidentally configured it to use jQuery.
![Spencer Renfro](https://secure.gravatar.com/avatar/290de00adbb10a59657d8efec59e6b36?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
Spencer Renfro
Courses Plus Student 11,133 PointsIt runs the first time then I refresh and run it and that code pops up, but thank you for your input on this!
![Steven Parker](https://uploads.teamtreehouse.com/production/profile-photos/969492/micro_tool_chess_set_2.jpg)
Steven Parker
230,688 PointsI tried multiple refreshes and still no error. But as I said, since the project doesn't use jQuery it's not even a possible error you could get from this project.
![Sunny Purdin](https://secure.gravatar.com/avatar/84a2715172bcf3ae108ca68d7ecf90f2?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
Sunny Purdin
5,232 PointsI am having the same problem. This is the error I am getting "Uncaught SyntaxError: Unexpected token ';' conditionals.js:4 "
![Steven Parker](https://uploads.teamtreehouse.com/production/profile-photos/969492/micro_tool_chess_set_2.jpg)
Steven Parker
230,688 PointsThat's a very different problem. You should start a fresh question and post a snapshot of your own workspace in it.
![Sunny Purdin](https://secure.gravatar.com/avatar/84a2715172bcf3ae108ca68d7ecf90f2?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
Sunny Purdin
5,232 PointsI did finally get it to work. I had to take the semicolons out for some reason and it worked.
![Steven Parker](https://uploads.teamtreehouse.com/production/profile-photos/969492/micro_tool_chess_set_2.jpg)
Steven Parker
230,688 PointsYou could still create a new question and post the original code if you'd like to understand what was happening.
Spencer Renfro
Courses Plus Student 11,133 PointsSpencer Renfro
Courses Plus Student 11,133 PointsI used this in the treehouse environment only and used the development tools for mac (command option j) here is my link: https://w.trhou.se/n1ffpq5k4n
Steven Parker
230,688 PointsSteven Parker
230,688 PointsI forked the snapshot, opened the preview, and it ran fine. I checked the entire project to confirm that there is no reference to jQuery, so I'm totally baffled by the message you are seeing.